Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2016-10-29 09:28:11 +0000
committerAndrey Loskutov2016-11-04 17:41:16 +0000
commit8ccd7fa0fae6e89d9a4d5df1c7165ba0112d4d59 (patch)
tree74e5ba25cbdd276ea14dc7aee6eb324c9619e0c2
parente1aab99c603e589eea162124fbb67f0b26f71e69 (diff)
downloadeclipse.platform.team-8ccd7fa0fae6e89d9a4d5df1c7165ba0112d4d59.tar.gz
eclipse.platform.team-8ccd7fa0fae6e89d9a4d5df1c7165ba0112d4d59.tar.xz
eclipse.platform.team-8ccd7fa0fae6e89d9a4d5df1c7165ba0112d4d59.zip
Bug 506732 - cleanup trailing spaces in team.core and team.ui
Change-Id: I6a92f3b0af9cd07df54bc2e37a8455a52eaf490c Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/ICache.java14
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/ICacheListener.java2
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/IFileContentManager.java58
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/IFileTypeInfo.java10
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/IIgnoreInfo.java8
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/IProjectSetSerializer.java18
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/IStringMapping.java14
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/ITeamStatus.java18
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/ProjectSetCapability.java102
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/ProjectSetSerializationContext.java26
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProvider.java246
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProviderType.java56
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/ScmUrlImportDescription.java8
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/Team.java112
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/TeamException.java18
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/TeamStatus.java6
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/DiffFilter.java6
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/FastDiffFilter.java6
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiff.java16
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffChangeEvent.java12
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffChangeListener.java6
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffTree.java32
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffVisitor.java6
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IThreeWayDiff.java34
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/ITwoWayDiff.java50
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/Diff.java18
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/DiffTree.java56
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/ThreeWayDiff.java12
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/provider/TwoWayDiff.java8
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileHistory.java14
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileHistoryProvider.java20
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileRevision.java34
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/ITag.java8
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/FileHistory.java2
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/FileHistoryProvider.java2
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/FileRevision.java8
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/importing/provisional/BundleImporterDelegate.java2
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/importing/provisional/IBundleImporter.java8
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/importing/provisional/IBundleImporterDelegate.java10
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ChangeTracker.java20
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/DelegatingStorageMerger.java16
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IChangeGroupingRequestor.java8
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IMergeContext.java52
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IMergeStatus.java4
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IResourceDiff.java28
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IResourceDiffTree.java18
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IResourceMappingMerger.java20
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IStorageMerger.java18
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationContext.java20
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScope.java50
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeChangeListener.java6
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeManager.java16
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeParticipant.java10
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeParticipantFactory.java2
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ResourceMappingMerger.java16
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/MergeContext.java48
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/MergeStatus.java12
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/ResourceDiff.java8
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/ResourceDiffTree.java14
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/SynchronizationContext.java10
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/SynchronizationScopeManager.java44
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/ISubscriberChangeEvent.java10
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/ISubscriberChangeListener.java8
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/Subscriber.java86
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SubscriberChangeEvent.java10
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SubscriberMergeContext.java16
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SubscriberResourceMappingContext.java26
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SubscriberScopeManager.java16
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/FastSyncInfoFilter.java22
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/ISyncInfoSetChangeEvent.java30
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/ISyncInfoSetChangeListener.java18
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/ISyncInfoTreeChangeEvent.java26
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfo.java168
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoFilter.java18
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoSet.java106
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoSetChangeEvent.java22
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoTree.java26
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/AbstractResourceVariantTree.java60
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/CachedResourceVariant.java60
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/IResourceVariant.java32
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/IResourceVariantComparator.java12
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/IResourceVariantTree.java18
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ISynchronizerChangeListener.java2
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/PersistantResourceVariantByteStore.java22
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ResourceVariantByteStore.java38
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ResourceVariantTree.java22
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ResourceVariantTreeSubscriber.java22
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/SessionResourceVariantByteStore.java14
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWayRemoteTree.java14
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWayResourceComparator.java16
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWaySubscriber.java30
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWaySynchronizer.java100
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/BackgroundEventHandler.java92
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Cache.java14
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultFileModificationValidator.java24
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultMoveDeleteHook.java4
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultProjectSetCapability.java4
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/ExceptionCollector.java20
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/FileContentManager.java66
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/FileModificationValidatorManager.java28
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/InfiniteSubProgressMonitor.java18
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Messages.java4
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/MoveDeleteManager.java20
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/NullSubProgressMonitor.java4
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/PessimisticResourceRuleFactory.java6
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/PluginStringMappings.java32
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Policy.java8
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/RepositoryProviderManager.java10
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/ResourceVariantCache.java50
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/ResourceVariantCacheEntry.java28
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/StorageMergerDescriptor.java6
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/StorageMergerRegistry.java20
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/StringMatcher.java84
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamHookDispatcher.java14
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamPlugin.java42
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamResourceChangeListener.java16
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/UserStringMappings.java34
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/history/LocalFileHistory.java6
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/history/LocalFileRevision.java26
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/importing/BundleImporterExtension.java6
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/AbstractResourceMappingScope.java6
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/CompoundResourceTraversal.java16
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/DiffChangeEvent.java16
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/IStreamMergerDelegate.java2
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/LineComparator.java6
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/LocalResourceVariant.java2
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ModelProviderResourceMapping.java6
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/PathTree.java32
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ResourceMappingInputScope.java10
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ResourceMappingScope.java20
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ResourceVariantFileRevision.java4
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/ScopeChangeEvent.java6
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/SyncInfoToDiffConverter.java34
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/CRLFtoLFInputStream.java8
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/LFtoCRLFInputStream.java6
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/PollingInputStream.java30
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/PollingOutputStream.java26
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/ProgressMonitorInputStream.java12
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/SizeConstrainedInputStream.java16
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/TimeoutInputStream.java22
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/TimeoutOutputStream.java14
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/AbstractSynchronizationScope.java8
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ActiveChangeSet.java12
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ActiveChangeSetManager.java42
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/BatchingChangeSetManager.java22
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/BatchingLock.java34
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ChangeSet.java14
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ChangeSetManager.java14
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/CheckedInChangeSet.java24
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ContentComparator.java2
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ContentComparisonDiffFilter.java6
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/DescendantResourceVariantByteStore.java18
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/DiffChangeSet.java26
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/DiffTreeStatistics.java16
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/IChangeSetChangeListener.java10
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberChangeSetManager.java50
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberDiffTreeEventHandler.java30
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberEventHandler.java58
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberResourceCollector.java34
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberSyncInfoCollector.java40
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberSyncInfoEventHandler.java32
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberSyncInfoSet.java14
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncByteConverter.java14
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncInfoStatistics.java16
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncInfoTreeChangeEvent.java2
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncInfoWorkingSetFilter.java10
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInput.java14
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInputFromSubscriber.java16
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInputFromSyncSet.java10
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/ThreeWayBaseTree.java6
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/WorkingSetFilteredSyncInfoCollector.java20
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/WorkingSetSyncSetInput.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamImages.java2
174 files changed, 2102 insertions, 2102 deletions
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
index 9326a0ee4..c3cbd1df1 100644
--- 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
@@ -15,7 +15,7 @@ package org.eclipse.team.core;
* 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.
- *
+ *
* @since 3.2
* @noimplement This interface is not intended to be implemented by clients.
*/
@@ -27,20 +27,20 @@ public interface ICache {
* @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
@@ -48,7 +48,7 @@ public interface ICache {
* @param listener the listener to add
*/
void addCacheListener(ICacheListener listener);
-
+
/**
* Remove the listener. Removing a listener that is not registered
* has no effect.
@@ -56,7 +56,7 @@ public interface ICache {
* @since 3.3
*/
void removeCacheListener(ICacheListener listener);
-
+
/**
* Remove the listener. Removing a listener that is not registered
* has no effect.
@@ -64,5 +64,5 @@ public interface ICache {
* @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
index 57a975463..a7038d312 100644
--- 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
@@ -16,7 +16,7 @@ package org.eclipse.team.core;
* when the cache is disposed.
* <p>
* Clients may implement this interface.
- *
+ *
* @since 3.2
*/
public interface ICacheListener {
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
index c2770d091..da0aaac8e 100644
--- 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -17,10 +17,10 @@ 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>
@@ -31,15 +31,15 @@ import org.eclipse.core.resources.IStorage;
* 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.
- *
+ *
* @see org.eclipse.team.core.Team#getFileContentManager()
- *
+ *
* @since 3.1
* @noimplement This interface is not intended to be implemented by clients.
*/
@@ -47,12 +47,12 @@ 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 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);
@@ -62,7 +62,7 @@ public interface IFileContentManager {
* @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);
@@ -72,7 +72,7 @@ public interface IFileContentManager {
* @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);
@@ -81,7 +81,7 @@ public interface IFileContentManager {
* 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);
@@ -90,7 +90,7 @@ public interface IFileContentManager {
* 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);
@@ -98,13 +98,13 @@ public interface IFileContentManager {
/**
* 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.
- *
+ * 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);
@@ -113,12 +113,12 @@ public interface IFileContentManager {
* 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);
@@ -127,12 +127,12 @@ public interface IFileContentManager {
* 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);
@@ -141,46 +141,46 @@ public interface IFileContentManager {
* 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
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
index 5dbfdba64..1276de402 100644
--- 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
@@ -13,7 +13,7 @@ package org.eclipse.team.core;
/**
* A file type info specifies both the file extension and the corresponding file
* type.
- *
+ *
* @since 2.0
* @deprecated Use the <code>IFileContentManager</code> API instead.
* @noimplement This interface is not intended to be implemented by clients.
@@ -21,20 +21,20 @@ package org.eclipse.team.core;
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
index ff9db82c3..7e62ac6f0 100644
--- 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
@@ -13,7 +13,7 @@ package org.eclipse.team.core;
/**
* An ignore info specifies both the pattern and the enabled state of a globally
* ignored pattern.
- *
+ *
* @since 2.0
* @noimplement This interface is not intended to be implemented by clients.
*/
@@ -24,9 +24,9 @@ public interface IIgnoreInfo {
* 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
+ * 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();
@@ -34,7 +34,7 @@ public interface IIgnoreInfo {
* 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
index 017dde194..45ed0334c 100644
--- 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
@@ -18,16 +18,16 @@ import org.eclipse.core.runtime.IProgressMonitor;
* 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
+ *
+ * @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.
@@ -36,17 +36,17 @@ public interface IProjectSetSerializer {
* 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
+ * @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.
@@ -55,11 +55,11 @@ public interface IProjectSetSerializer {
* 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
+ * @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
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
index bb4d2fdc0..197901ac6 100644
--- 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
@@ -15,26 +15,26 @@ 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>.
- *
+ *
* @since 3.1
* @noimplement This interface is not intended to be implemented by clients.
*/
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
index a7a1126bb..fb48940cb 100644
--- 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
@@ -15,38 +15,38 @@ 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 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 affect several resources in a <code>SyncInfoSet</code>.
- * The error will be cleared when the set is reset.
+ * 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.
+ * 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
+
+ /** 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.
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
index 52bc5b6fc..bb4e08793 100644
--- 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
@@ -26,20 +26,20 @@ import org.eclipse.team.internal.core.Messages;
* 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 {
-
+
/**
* Scheme constant (value "scm") indicating the SCM URI.
- *
+ *
* @since 3.6
*/
public static final String SCHEME_SCM = "scm"; //$NON-NLS-1$
-
+
/**
* Ensure that the provider type is backwards compatible by
* passing the project set serializer to the type if a serializer
@@ -49,10 +49,10 @@ public abstract class ProjectSetCapability {
* 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) {
@@ -63,50 +63,50 @@ public abstract class ProjectSetCapability {
}
}
}
-
+
/**
* 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
+ * @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
+ *
+ * @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.
@@ -116,14 +116,14 @@ public abstract class ProjectSetCapability {
* 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
+ * 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
+ * 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)
@@ -132,10 +132,10 @@ public abstract class ProjectSetCapability {
* (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
+ * @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
@@ -146,11 +146,11 @@ public abstract class ProjectSetCapability {
ProjectSetSerializationContext context,
IProgressMonitor monitor)
throws TeamException {
-
+
if (serializer != null) {
return serializer.asReference(providerProjects, context.getShell(), monitor);
}
- throw new TeamException(Messages.ProjectSetCapability_0);
+ throw new TeamException(Messages.ProjectSetCapability_0);
}
/**
@@ -166,14 +166,14 @@ public abstract class ProjectSetCapability {
* has successfully completed.
* <p>
* This default implementation simply throws an exception
- * indicating that no projects can be loaded unless there
+ * indicating that no projects can be loaded unless there
* is an {@link IProjectSetSerializer} registered for the repository
- * provider type in which case the operation is delegated to the
+ * 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)
@@ -196,11 +196,11 @@ public abstract class ProjectSetCapability {
ProjectSetSerializationContext context,
IProgressMonitor monitor)
throws TeamException {
-
+
if (serializer != null) {
return serializer.addToWorkspace(referenceStrings, context.getFilename(), context.getShell(), monitor);
}
- throw new TeamException(Messages.ProjectSetCapability_1);
+ throw new TeamException(Messages.ProjectSetCapability_1);
}
////////////////////////////////////////////////////////////////////////////
@@ -212,16 +212,16 @@ public abstract class ProjectSetCapability {
/**
* 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
+ * @param projects
* an array of proposed projects to be loaded
* (not <code>null</code>, contains no <code>null</code>s)
- * @return
+ * @return
* an array of confirmed projects to be loaded
* or <code>null</code> if the operation is to be canceled.
* @throws TeamException
@@ -230,9 +230,9 @@ public abstract class ProjectSetCapability {
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];
@@ -244,9 +244,9 @@ public abstract class ProjectSetCapability {
}
if (existingProjects.size() == 0)
return projects;
-
+
// Confirm the overwrite
-
+
IProject[] confirmed =
context.confirmOverwrite(
(IProject[]) existingProjects.toArray(
@@ -255,9 +255,9 @@ public abstract class ProjectSetCapability {
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);
@@ -268,7 +268,7 @@ public abstract class ProjectSetCapability {
}
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
@@ -277,14 +277,14 @@ public abstract class ProjectSetCapability {
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
+ * the <code>org.eclipse.core.filesystem.filesystems</code> extension
* point.
* @see #getProject(String)
- * @param referenceString a reference string obtained from
+ * @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
@@ -292,13 +292,13 @@ public abstract class ProjectSetCapability {
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
+ * @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>
@@ -307,7 +307,7 @@ public abstract class ProjectSetCapability {
public String getProject(String referenceString) {
return null;
}
-
+
/**
* Convert the given URI and projectName to a reference string that can be
* passed to the
@@ -321,7 +321,7 @@ public abstract class ProjectSetCapability {
* The default implementation returns <code>null</code>. Subclasses may
* override.
* </p>
- *
+ *
* @see #SCHEME_SCM
* @param uri
* the URI that identifies the location of the project in the
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
index b6826213c..9c1d1fe5b 100644
--- 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
@@ -20,11 +20,11 @@ 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();
@@ -34,16 +34,16 @@ public class ProjectSetSerializationContext {
public ProjectSetSerializationContext() {
this(null);
}
-
+
/**
- * Create a serialization context and set the filename of the file
+ * 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.
@@ -51,22 +51,22 @@ public class ProjectSetSerializationContext {
* This default implementation always returns an empty array
* indicating that no existing projects should be overwritten.
* Subclasses may override this as appropriate.
- *
- * @param projects
+ *
+ * @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
+ * @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
+ * 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>
@@ -74,16 +74,16 @@ public class ProjectSetSerializationContext {
public Object getShell() {
return null;
}
-
+
/**
- * Return the name of the file to or from which the project set is being loaded or saved.
+ * 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
@@ -93,7 +93,7 @@ public class ProjectSetSerializationContext {
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.
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
index cb3ad2c40..3b051a58d 100644
--- 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
@@ -33,9 +33,9 @@ import org.eclipse.team.internal.core.*;
* must minimally:
* <ol>
* <li>extend <code>RepositoryProvider</code>
- * <li>define a repository extension in <code>plugin.xml</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
@@ -54,24 +54,24 @@ import org.eclipse.team.internal.core.*;
* @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;
-
+ 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
@@ -89,16 +89,16 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
// 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
+ // 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) {
@@ -107,11 +107,11 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
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);
@@ -124,17 +124,17 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
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 {
@@ -145,13 +145,13 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
} 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
@@ -162,15 +162,15 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
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 }));
-
+ 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() ||
+ 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));
@@ -192,14 +192,14 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
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));
+ 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);
@@ -208,7 +208,7 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
throw TeamPlugin.wrapException(e);
}
return provider;
- }
+ }
private static RepositoryProvider mapExistingProvider(IProject project, String id) throws TeamException {
try {
@@ -250,12 +250,12 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
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() }));
+ 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);
@@ -263,23 +263,23 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
// 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);
+ 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 {
@@ -290,8 +290,8 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
} finally {
Job.getJobManager().endRule(rule);
}
- }
-
+ }
+
/*
* Return the provider mapped to project, or null if none;
*/
@@ -301,7 +301,7 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
return (RepositoryProvider) provider;
}
return null;
- }
+ }
/**
@@ -312,21 +312,21 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
}
/**
- * Configures the provider for the given project. This method is called after <code>setProject</code>.
+ * 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.
+ *
+ * @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 {
@@ -336,7 +336,7 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
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 new CoreException(new Status(IStatus.ERROR, TeamPlugin.ID, 0, Messages.RepositoryProvider_Error_removing_nature_from_project___1 + getID(), e2));
}
throw e;
}
@@ -349,30 +349,30 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
*/
protected void deconfigured() {
}
-
+
/**
- * Answer the id of this provider instance. The id should be the repository provider's
+ * 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
+ * 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
+ * @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
@@ -386,10 +386,10 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
* <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
@@ -414,7 +414,7 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
}
};
}
-
+
/**
* Returns an <code>IFileHistoryProvider</code> which can be used to access
* file histories. By default, returns <code>null</code>. Subclasses may override.
@@ -425,46 +425,46 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
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.
+ * 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() });
+ 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();
@@ -476,10 +476,10 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
}
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
+ * 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>
@@ -487,9 +487,9 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
* @return the repository provider associated with the project
*/
final public static RepositoryProvider getProvider(IProject project) {
- try {
+ try {
if (project.isAccessible()) {
-
+
//-----------------------------
//First, look for the session property
RepositoryProvider provider = lookupProviderProp(project);
@@ -499,15 +499,15 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
// 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();
@@ -521,7 +521,7 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
for (int j = 0; j < setIds.length; j++) {
if(setIds[j].equals(TEAM_SETID)) {
return getProvider(project, natureIds[i]);
- }
+ }
}
}
}
@@ -535,7 +535,7 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
}
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
@@ -546,10 +546,10 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
}
/**
- * Returns a provider of type with the given id if associated with the given project
+ * 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
@@ -570,11 +570,11 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
// 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
+ // The ids are equal so instantiate and return
RepositoryProvider newProvider = mapExistingProvider(project, id);
if (newProvider!= null && newProvider.getID().equals(id)) {
return newProvider;
@@ -583,7 +583,7 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
return null;
}
}
-
+
//couldn't find using new method, fall back to lookup using natures for backwards compatibility
//-----------------------------
@@ -592,12 +592,12 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
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);
- }
+ }
}
markAsUnshared(project);
}
@@ -609,20 +609,20 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
}
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) {
@@ -642,7 +642,7 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
return false;
}
}
-
+
private static boolean isMarkedAsUnshared(IProject project) {
try {
return project.getSessionProperty(TeamPlugin.PROVIDER_PROP_KEY) == NOT_MAPPED;
@@ -672,10 +672,10 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
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);
@@ -710,17 +710,17 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
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);
+ 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
@@ -728,14 +728,14 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
* 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
*/
@@ -743,10 +743,10 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
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);
+ 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
@@ -754,14 +754,14 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
* 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) {
@@ -773,30 +773,30 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
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);
+ 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
+ * 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
@@ -808,24 +808,24 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
* 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) {
+ public Object getAdapter(Class adapter) {
return null;
}
@@ -836,7 +836,7 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
* 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
+ * 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
@@ -850,10 +850,10 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
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
+ * 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.
@@ -866,4 +866,4 @@ public abstract class RepositoryProvider implements IProjectNature, IAdaptable {
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
index 5abf06217..75f302ace 100644
--- 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
@@ -24,15 +24,15 @@ import org.eclipse.team.internal.core.TeamPlugin;
* 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
+ * 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>.
+ * <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
@@ -43,20 +43,20 @@ import org.eclipse.team.internal.core.TeamPlugin;
* <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;
@@ -66,10 +66,10 @@ public abstract class RepositoryProviderType extends PlatformObject {
/**
* 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) {
@@ -77,12 +77,12 @@ public abstract class RepositoryProviderType extends PlatformObject {
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
@@ -101,7 +101,7 @@ public abstract class RepositoryProviderType extends PlatformObject {
}
return findProviderForScheme(scheme);
}
-
+
private static RepositoryProviderType findProviderForScheme(String scheme) {
IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(TeamPlugin.ID, TeamPlugin.REPOSITORY_EXTENSION);
if (extension != null) {
@@ -116,14 +116,14 @@ public abstract class RepositoryProviderType extends PlatformObject {
}
}
}
- }
+ }
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) {
@@ -132,7 +132,7 @@ public abstract class RepositoryProviderType extends PlatformObject {
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;
@@ -142,7 +142,7 @@ public abstract class RepositoryProviderType extends PlatformObject {
} 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$
@@ -158,10 +158,10 @@ public abstract class RepositoryProviderType extends PlatformObject {
}
}
}
- }
+ }
return null;
- }
-
+ }
+
private void setFileSystemScheme(String scheme) {
this.scheme = scheme;
}
@@ -169,7 +169,7 @@ public abstract class RepositoryProviderType extends PlatformObject {
/**
* 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() {
@@ -195,7 +195,7 @@ public abstract class RepositoryProviderType extends PlatformObject {
* 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() {
@@ -208,7 +208,7 @@ public abstract class RepositoryProviderType extends PlatformObject {
}
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>
@@ -220,19 +220,19 @@ public abstract class RepositoryProviderType extends PlatformObject {
* 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
+ * 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>
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/ScmUrlImportDescription.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/ScmUrlImportDescription.java
index 34d29ffcd..b8f66e462 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/ScmUrlImportDescription.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/ScmUrlImportDescription.java
@@ -26,7 +26,7 @@ import java.util.HashMap;
* progress. There is no guarantee that this API will work or that it will
* remain the same. Please do not use this API without consulting with the Team
* team.
- *
+ *
* @since 3.6
*/
public class ScmUrlImportDescription {
@@ -48,7 +48,7 @@ public class ScmUrlImportDescription {
/**
* SCM URL
- *
+ *
* @return a string representation of the SCM URL
*/
public String getUrl() {
@@ -65,7 +65,7 @@ public class ScmUrlImportDescription {
/**
* Sets or removes a client property.
- *
+ *
* @param key
* property key
* @param value
@@ -85,7 +85,7 @@ public class ScmUrlImportDescription {
/**
* Returns the specified client property, or <code>null</code> if none.
- *
+ *
* @param key
* property key
* @return property value or <code>null</code>
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
index c8feb042c..79ddfdb33 100644
--- 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
@@ -27,13 +27,13 @@ import org.eclipse.team.internal.core.importing.BundleImporterExtension;
/**
* 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) {
@@ -47,45 +47,45 @@ public final class Team {
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);
-
+ 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;
-
+
private static List fBundleImporters;
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) {
@@ -94,10 +94,10 @@ public final class Team {
/**
* 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
*/
@@ -105,7 +105,7 @@ public final class Team {
if (resource.isDerived()) return true;
return matchesEnabledIgnore(resource);
}
-
+
/**
* Returns whether the given file should be ignored.
* @param file file to check
@@ -116,7 +116,7 @@ public final class Team {
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++) {
@@ -128,7 +128,7 @@ public final class Team {
}
return false;
}
-
+
/**
* Returns whether the given file should be ignored.
* @param file file to check
@@ -139,10 +139,10 @@ public final class Team {
return matchesEnabledIgnore(file);
}
-
+
/**
* Return all known file types.
- *
+ *
* @return all known file types
* @deprecated Use <code>getFileContentManager().getExtensionMappings()</code> instead.
*/
@@ -154,7 +154,7 @@ public final class Team {
}
return infos;
}
-
+
/**
* Returns the list of global ignores.
* @return all ignore infos representing globally ignored patterns
@@ -176,7 +176,7 @@ public final class Team {
try {
readIgnoreState();
} catch (TeamException e) {
- TeamPlugin.log(IStatus.ERROR, Messages.Team_Error_loading_ignore_state_from_disk_1, e);
+ TeamPlugin.log(IStatus.ERROR, Messages.Team_Error_loading_ignore_state_from_disk_1, e);
}
initializePluginIgnores(pluginIgnore, globalIgnore);
}
@@ -218,8 +218,8 @@ public final class Team {
}
return ignoreMatchers;
}
-
-
+
+
/**
* Set the file type for the give extensions. This
* will replace the existing file types with this new list.
@@ -228,21 +228,21 @@ public final class Team {
* 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.
- *
+ *
* @param patterns Array of patterns to set
- * @param enabled Array of booleans indicating if given pattern is enabled
+ * @param enabled Array of booleans indicating if given pattern is enabled
*/
public static void setAllIgnores(String[] patterns, boolean[] enabled) {
initializeIgnores();
@@ -267,17 +267,17 @@ public final class Team {
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) {
@@ -359,7 +359,7 @@ public final class Team {
/*
* IGNORE
- *
+ *
* Reads global ignore preferences and populates globalIgnore
*/
private static void readIgnoreState() throws TeamException {
@@ -383,7 +383,7 @@ public final class Team {
if (pattern.length()==0) return;
enabled = tok.nextToken();
globalIgnore.put(pattern, Boolean.valueOf(enabled));
- }
+ }
} catch (NoSuchElementException e) {
return;
}
@@ -420,30 +420,30 @@ public final class Team {
} 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));
+ 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
+ * @deprecated
* Use {@link org.eclipse.team.core.RepositoryProviderType#getProjectSetCapability()}
* to obtain an instance of {@link ProjectSetCapability} instead.
*/
@@ -467,11 +467,11 @@ public final class Team {
}
}
}
- }
+ }
}
return null;
}
-
+
/**
* Return the default ignore infos
@@ -511,17 +511,17 @@ public final class Team {
/**
* 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.
@@ -529,13 +529,13 @@ public final class Team {
* @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.
@@ -543,13 +543,13 @@ public final class Team {
* @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 static 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.
@@ -563,7 +563,7 @@ public final class Team {
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.
@@ -580,14 +580,14 @@ public final class Team {
/**
* Returns the available bundle importers.
- *
+ *
* <p>
* <strong>EXPERIMENTAL</strong>. This interface has been added as part of a
* work in progress. There is no guarantee that this API will work or that
* it will remain the same. Please do not use this API without consulting
* with the Team team.
* </p>
- *
+ *
* @return IBundleImporter[] returns the available bundle importers
* @since 3.6
* @noreference This method is not intended to be referenced by clients.
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
index c749c660d..2718b717b 100644
--- 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
@@ -28,7 +28,7 @@ import org.eclipse.team.internal.core.TeamPlugin;
* @since 2.0
*/
public class TeamException extends CoreException {
-
+
// Field required to avoid compiler warning
private static final long serialVersionUID = 1L;
@@ -52,7 +52,7 @@ public class TeamException extends CoreException {
// 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;
@@ -61,12 +61,12 @@ public class TeamException extends CoreException {
* @param status the status for this exception
*/
public TeamException(IStatus status) {
- super(status);
+ super(status);
}
/**
* Create a <code>TeamException</code> with an
- * error status that contains the given message and
+ * error status that contains the given message and
* throwable.
* @param message the message for the exception
* @param e an associated exception
@@ -75,7 +75,7 @@ public class TeamException extends CoreException {
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.
@@ -84,13 +84,13 @@ public class TeamException extends CoreException {
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) {
+ protected TeamException(CoreException e) {
super(asStatus(e));
}
@@ -106,12 +106,12 @@ public class TeamException extends CoreException {
* @since 3.0
*/
public static TeamException asTeamException(CoreException e) {
- if (e instanceof TeamException) {
+ if (e instanceof TeamException) {
return (TeamException)e;
}
return new TeamException(e);
}
-
+
/**
* Return a <code>TeamException</code> for the given exception.
* @param e an exception
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
index 9c85e09c8..689f382ed 100644
--- 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
@@ -17,7 +17,7 @@ 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 {
@@ -33,7 +33,7 @@ public class TeamStatus extends Status implements ITeamStatus {
* @param message a human-readable message, localized to the
* current locale
* @param exception a low-level exception, or <code>null</code> if not
- * applicable
+ * applicable
* @param resource the resource associated with the exception
*/
public TeamStatus(int severity, String pluginId, int code, String message, Throwable exception, IResource resource) {
@@ -44,7 +44,7 @@ public class TeamStatus extends Status implements ITeamStatus {
this.resource = resource;
}
}
-
+
/**
* Return the resource associated with this status.
* @return Returns the 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
index fd50ad5e7..ae97c4bc1 100644
--- 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
@@ -16,17 +16,17 @@ 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
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
index 1d8e58676..4d9a6d298 100644
--- 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
@@ -17,14 +17,14 @@ 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) {
@@ -49,7 +49,7 @@ public abstract class FastDiffFilter extends DiffFilter {
/**
* 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
*/
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
index ba1a53194..c47bc4224 100644
--- 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
@@ -14,7 +14,7 @@ import org.eclipse.team.core.diff.provider.Diff;
/**
* A diff describes differences between two or more model objects.
- *
+ *
* @see ITwoWayDiff
* @see IThreeWayDiff
* @since 3.2
@@ -32,7 +32,7 @@ public interface IDiff {
/**
* 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;
@@ -41,7 +41,7 @@ public interface IDiff {
* 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;
@@ -50,7 +50,7 @@ public interface IDiff {
* 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;
@@ -59,18 +59,18 @@ public interface IDiff {
* 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();
@@ -78,7 +78,7 @@ public interface IDiff {
/**
* 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
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
index 9df1e1733..88241f4ea 100644
--- 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
@@ -16,36 +16,36 @@ import org.eclipse.core.runtime.IStatus;
/**
* A change event that describes changes that have occurred
* in an {@link IDiffTree}.
- *
+ *
* @since 3.2
* @noimplement This interface is not intended to be implemented by clients.
*/
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
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
index 99b9f84d9..2d1488134 100644
--- 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
@@ -16,9 +16,9 @@ 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 {
@@ -29,7 +29,7 @@ public interface IDiffChangeListener {
* @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
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
index f0e43adcd..7df5629c2 100644
--- 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
@@ -17,7 +17,7 @@ import org.eclipse.core.runtime.*;
* 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.
- *
+ *
* @see org.eclipse.team.core.diff.provider.DiffTree
* @since 3.2
* @noimplement This interface is not intended to be implemented by clients.
@@ -25,12 +25,12 @@ import org.eclipse.core.runtime.*;
* {@link org.eclipse.team.core.diff.provider.DiffTree} instead.
*/
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.
*/
@@ -40,7 +40,7 @@ public interface IDiffTree {
* 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);
@@ -48,7 +48,7 @@ public interface IDiffTree {
/**
* 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);
@@ -59,7 +59,7 @@ public interface IDiffTree {
* 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
@@ -76,7 +76,7 @@ public interface IDiffTree {
* 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
@@ -88,7 +88,7 @@ public interface IDiffTree {
* 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
*/
@@ -99,13 +99,13 @@ public interface IDiffTree {
* @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.
@@ -121,15 +121,15 @@ public interface IDiffTree {
* @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
+ * @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
@@ -138,14 +138,14 @@ public interface IDiffTree {
*/
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
+ * @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.
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
index a7ad5c82b..2e57c7343 100644
--- 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
@@ -12,7 +12,7 @@ package org.eclipse.team.core.diff;
/**
* An objects that visits diffs in a diff tree.
- * <p>
+ * <p>
* Usage:
* <pre>
* class Visitor implements IDiffVisitor {
@@ -39,12 +39,12 @@ package org.eclipse.team.core.diff;
* 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
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
index b732163db..eeb649d66 100644
--- 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
@@ -20,65 +20,65 @@ import org.eclipse.team.core.diff.provider.ThreeWayDiff;
* 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.
- *
+ *
* @since 3.2
* @noimplement This interface is not intended to be implemented by clients.
* Clients that need to create deltas should instead use
* {@link ThreeWayDiff}.
*/
public interface IThreeWayDiff extends IDiff {
-
+
/*====================================================================
- * Constants defining synchronization direction:
+ * 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.
+ * 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.
+ * 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
+ * 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
+ * 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
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
index a8845a5fc..2046e0a82 100644
--- 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
@@ -18,9 +18,9 @@ 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.
- *
+ *
* @see IDiffTree
- *
+ *
* @since 3.2
* @noimplement This interface is not intended to be implemented by clients.
* Clients that need to create two-way diffs should instead use or
@@ -34,15 +34,15 @@ public interface ITwoWayDiff extends IDiff {
/**
* Change constant (bit mask) indicating that the content of the object has changed.
- *
- * @see ITwoWayDiff#getFlags()
+ *
+ * @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;
@@ -50,7 +50,7 @@ public interface ITwoWayDiff extends IDiff {
/**
* 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;
@@ -58,27 +58,27 @@ public interface ITwoWayDiff extends IDiff {
/**
* 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).
- *
+ * 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
+ * <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
@@ -99,18 +99,18 @@ public interface ITwoWayDiff extends IDiff {
* <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>,
+ * 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,
+ * 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>
*
@@ -125,10 +125,10 @@ public interface ITwoWayDiff extends IDiff {
* @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
+ * 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>
@@ -142,13 +142,13 @@ public interface ITwoWayDiff extends IDiff {
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
+ * 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()
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
index a14b57513..a83e0155e 100644
--- 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
@@ -17,7 +17,7 @@ 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
@@ -27,7 +27,7 @@ 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;
@@ -38,7 +38,7 @@ public abstract class Diff implements IDiff {
/**
* 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.
@@ -50,7 +50,7 @@ public abstract class Diff implements IDiff {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.team.core.synchronize.ISyncDelta#getFullPath()
*/
public IPath getPath() {
@@ -59,7 +59,7 @@ public abstract class Diff implements IDiff {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.team.core.synchronize.ISyncDelta#getKind()
*/
public int getKind() {
@@ -71,7 +71,7 @@ public abstract class Diff implements IDiff {
* 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() {
@@ -84,16 +84,16 @@ public abstract class Diff implements IDiff {
public String toDiffString() {
int kind = getKind();
String label = SyncInfoToDiffConverter.diffKindToString(kind);
- return label;
+ 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)
*/
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
index bbdbe4953..cceae1d6b 100644
--- 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
@@ -24,27 +24,27 @@ import org.eclipse.team.internal.core.subscribers.DiffTreeStatistics;
/**
* Implementation of {@link IDiffTree}.
- *
+ *
* @since 3.2
* @noextend This class is not intended to be subclassed by clients. Clients can
* instead use {@link DiffTree}.
*/
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;
@@ -57,7 +57,7 @@ public class DiffTree implements IDiffTree {
public DiffTree() {
resetChanges();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.synchronize.ISyncDeltaTree#addSyncDeltaChangeListener(org.eclipse.team.core.synchronize.ISyncDeltaChangeListener)
*/
@@ -152,7 +152,7 @@ public class DiffTree implements IDiffTree {
* 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) {
@@ -181,11 +181,11 @@ public class DiffTree implements IDiffTree {
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
+ * 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>
@@ -216,7 +216,7 @@ public class DiffTree implements IDiffTree {
public void endInput(IProgressMonitor monitor) {
try {
if (lock.getDepth() == 1) {
- // Remain locked while firing the events so the handlers
+ // 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));
}
@@ -226,12 +226,12 @@ public class DiffTree implements IDiffTree {
}
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++) {
@@ -251,7 +251,7 @@ public class DiffTree implements IDiffTree {
listener.propertyChanged(DiffTree.this, key.intValue(), (IPath[]) paths.toArray(new IPath[paths
.size()]));
}
-
+
} finally {
lockedForModification = false;
}
@@ -264,7 +264,7 @@ public class DiffTree implements IDiffTree {
private DiffChangeEvent getChangeEvent() {
return changes;
}
-
+
private void resetChanges() {
changes = createEmptyChangeEvent();
}
@@ -290,7 +290,7 @@ public class DiffTree implements IDiffTree {
}
setPropertyToRoot(delta, P_HAS_DESCENDANT_CONFLICTS, isConflict);
}
-
+
private void internalRemove(IDiff delta) {
Assert.isTrue(!lockedForModification);
statistics.remove(delta);
@@ -298,18 +298,18 @@ public class DiffTree implements IDiffTree {
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();
}
@@ -321,7 +321,7 @@ public class DiffTree implements IDiffTree {
public IPath[] getPaths() {
return pathTree.getPaths();
}
-
+
/**
* Return all the diffs contained in this diff tree.
* @return all the diffs contained in this diff tree
@@ -329,7 +329,7 @@ public class DiffTree implements IDiffTree {
public IDiff[] getDiffs() {
return (IDiff[]) pathTree.values().toArray(new IDiff[pathTree.size()]);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.diff.IDiffTree#countFor(int, int)
*/
@@ -358,7 +358,7 @@ public class DiffTree implements IDiffTree {
endInput(null);
}
}
-
+
private void accumulatePropertyChanges(int property, IPath[] paths) {
Integer key = new Integer(property);
Set changes = (Set)propertyChanges.get(key);
@@ -410,7 +410,7 @@ public class DiffTree implements IDiffTree {
endInput(monitor);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.diff.IDiffTree#hasDiffsMatching(org.eclipse.core.runtime.IPath, org.eclipse.team.core.diff.FastDiffFilter)
*/
@@ -424,7 +424,7 @@ public class DiffTree implements IDiffTree {
}
return false;
}
-
+
}, IResource.DEPTH_INFINITE);
} catch (RuntimeException e) {
if (e == found)
@@ -433,13 +433,13 @@ public class DiffTree implements IDiffTree {
}
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.
*/
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
index 77a4c483e..575b593c0 100644
--- 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
@@ -19,7 +19,7 @@ import org.eclipse.team.internal.core.mapping.SyncInfoToDiffConverter;
/**
* Implementation of {@link IThreeWayDiff}.
- *
+ *
* @since 3.2
* @noextend This class is not intended to be subclassed by clients.
*/
@@ -62,7 +62,7 @@ public class ThreeWayDiff extends Diff implements IThreeWayDiff {
}
return direction;
}
-
+
private static int calculateKind(ITwoWayDiff localChange, ITwoWayDiff remoteChange) {
int localKind = NO_CHANGE;
if (localChange != null)
@@ -105,14 +105,14 @@ public class ThreeWayDiff extends Diff implements IThreeWayDiff {
int kind = getKind();
String label = ""; //$NON-NLS-1$
if(kind==IDiff.NO_CHANGE) {
- label = super.toDiffString();
+ label = super.toDiffString();
} else {
label = SyncInfoToDiffConverter.diffDirectionToString(getDirection());
label = NLS.bind(Messages.concatStrings, new String[] { label, super.toDiffString() });
}
- return label;
+ return label;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.diff.provider.Diff#equals(java.lang.Object)
*/
@@ -122,7 +122,7 @@ public class ThreeWayDiff extends Diff implements IThreeWayDiff {
if (super.equals(obj)) {
if (obj instanceof ThreeWayDiff) {
ThreeWayDiff other = (ThreeWayDiff) obj;
- return changesEqual(getLocalChange(), other.getLocalChange())
+ return changesEqual(getLocalChange(), other.getLocalChange())
&& changesEqual(getRemoteChange(), other.getRemoteChange());
}
}
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
index 2cc8ae660..01e261f16 100644
--- 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
@@ -20,7 +20,7 @@ import org.eclipse.team.core.diff.ITwoWayDiff;
* should override these methods.
* <p>
* This class may be subclassed by clients.
- *
+ *
* @since 3.2
*/
public class TwoWayDiff extends Diff implements ITwoWayDiff {
@@ -30,7 +30,7 @@ public class TwoWayDiff extends Diff implements ITwoWayDiff {
* 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;
@@ -51,7 +51,7 @@ public class TwoWayDiff extends Diff implements ITwoWayDiff {
public int getFlags() {
return getStatus() & ~KIND_MASK;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.delta.ITwoWayDelta#getMovedToPath()
*/
@@ -65,7 +65,7 @@ public class TwoWayDiff extends Diff implements ITwoWayDiff {
public IPath getFromPath() {
return null;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.diff.provider.Diff#equals(java.lang.Object)
*/
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
index a40fab470..1b7cf1b94 100644
--- 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
@@ -14,7 +14,7 @@ import org.eclipse.team.core.history.provider.FileHistory;
/**
* Provides a complete set of IFileRevisions that make up this IFileHistory.
- *
+ *
* @since 3.2
* @noimplement This interface is not intended to be implemented by clients.
* Clients can instead subclass {@link FileHistory}.
@@ -28,15 +28,15 @@ public interface IFileHistory {
* 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
+ * @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,
@@ -49,13 +49,13 @@ public interface IFileHistory {
* 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
+ * 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
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
index 5337f03a1..8aa49ed74 100644
--- 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
@@ -17,27 +17,27 @@ import org.eclipse.team.core.history.provider.FileHistoryProvider;
/**
* This is API to access individual file histories.
- *
+ *
* @since 3.2
* @noimplement This interface is not intended to be implemented by clients.
* Clients can instead subclass {@link FileHistoryProvider}.
- *
+ *
*/
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
@@ -59,7 +59,7 @@ public interface IFileHistoryProvider {
* {@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
@@ -69,17 +69,17 @@ public interface IFileHistoryProvider {
* @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
@@ -88,5 +88,5 @@ public interface IFileHistoryProvider {
* @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
index e211b7b40..10bef8667 100644
--- 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
@@ -20,7 +20,7 @@ import org.eclipse.team.core.history.provider.FileRevision;
/**
* Represents an individual revision of a file.
- *
+ *
* @since 3.2
* @noimplement This interface is not intended to be implemented by clients.
* Clients can instead subclass {@link FileRevision}.
@@ -34,7 +34,7 @@ public interface IFileRevision {
* file state represents the current state of
* the returned <code>IFile</code>.
* @param monitor a progress monitor
- * @return IStorage containing file storage
+ * @return IStorage containing file storage
* @throws CoreException if an error occurs
*/
public IStorage getStorage(IProgressMonitor monitor) throws CoreException;
@@ -55,7 +55,7 @@ public interface IFileRevision {
/**
* 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
*
@@ -68,13 +68,13 @@ public interface IFileRevision {
* @return whether the file represented by this state exists
*/
public boolean exists();
-
+
/**
- * Returns the <em>unique</em> identifier for this file revision
+ * 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
+ * is returned, clients can use the timestamp to differentiate
* revisions.
- * @return the <em>unique</em> identifier for this file revision
+ * @return the <em>unique</em> identifier for this file revision
* or <code>null</code>
*/
public String getContentIdentifier();
@@ -82,7 +82,7 @@ public interface IFileRevision {
/**
* 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();
@@ -90,15 +90,15 @@ public interface IFileRevision {
/**
* 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 branches names of file revision.
- *
- * @return an array of ITag's if branch names exist for this revision
+ *
+ * @return an array of ITag's if branch names exist for this revision
* or an empty ITag array if no names exist
* @since 3.6
*/
@@ -106,22 +106,22 @@ public interface IFileRevision {
/**
* 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
+ * 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
+ *
+ * @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
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
index 958d5edd5..c1001c26d 100644
--- 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
@@ -11,13 +11,13 @@
package org.eclipse.team.core.history;
/**
- * ITags can be used to hang additional repository information for IFileRevisions.
- *
- * @see IFileRevision
+ * 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
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
index 01ab22ae3..acfa3c05c 100644
--- 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.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.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
index 7facfc483..1f7d18cb5 100644
--- 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.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.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
index fc8a8015a..8db6fcf74 100644
--- 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
@@ -22,11 +22,11 @@ import org.eclipse.team.core.history.IFileRevision;
import org.eclipse.team.core.history.ITag;
/**
- * Abstract implementation of {@link IFileRevision} that can be implemented by
+ * Abstract implementation of {@link IFileRevision} that can be implemented by
* clients.
- *
+ *
* @see IFileRevision
- *
+ *
* @since 3.2
*/
public abstract class FileRevision implements IFileRevision {
@@ -147,5 +147,5 @@ public abstract class FileRevision implements IFileRevision {
public ITag[] getTags() {
return new ITag[0];
}
-
+
}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/importing/provisional/BundleImporterDelegate.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/importing/provisional/BundleImporterDelegate.java
index 64805d6a7..a662f8748 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/importing/provisional/BundleImporterDelegate.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/importing/provisional/BundleImporterDelegate.java
@@ -30,7 +30,7 @@ import org.osgi.framework.Constants;
* will remain the same. Please do not use this API without consulting with the
* Team team.
* </p>
- *
+ *
* @since 3.6
*/
public abstract class BundleImporterDelegate implements IBundleImporterDelegate {
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/importing/provisional/IBundleImporter.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/importing/provisional/IBundleImporter.java
index d370fbe2f..fadd1cc57 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/importing/provisional/IBundleImporter.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/importing/provisional/IBundleImporter.java
@@ -25,7 +25,7 @@ package org.eclipse.team.core.importing.provisional;
* will remain the same. Please do not use this API without consulting with the
* Team team.
* </p>
- *
+ *
* @since 3.6
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
@@ -34,21 +34,21 @@ public interface IBundleImporter extends IBundleImporterDelegate {
/**
* Returns this impoter's unique identifier.
- *
+ *
* @return identifier
*/
public String getId();
/**
* Returns a short description of this importer, or <code>null</code> if unspecified.
- *
+ *
* @return description or <code>null</code>
*/
public String getDescription();
/**
* Returns a human readable name for this importer.
- *
+ *
* @return name
*/
public String getName();
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/importing/provisional/IBundleImporterDelegate.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/importing/provisional/IBundleImporterDelegate.java
index 38eb22531..635e37928 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/importing/provisional/IBundleImporterDelegate.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/importing/provisional/IBundleImporterDelegate.java
@@ -23,7 +23,7 @@ import org.eclipse.team.core.ScmUrlImportDescription;
* on bundle manifest entries.
* <p>
* Following is an example extension:
- *
+ *
* <pre>
* &lt;extension point=&quot;org.eclipse.team.core.bundleImporters&quot;&gt;
* &lt;importer
@@ -32,7 +32,7 @@ import org.eclipse.team.core.ScmUrlImportDescription;
* &lt;/importer&gt;
* &lt;/extension&gt;
* </pre>
- *
+ *
* </p>
* <p>
* Clients contributing bundle importer extensions are intended to implement
@@ -44,7 +44,7 @@ import org.eclipse.team.core.ScmUrlImportDescription;
* will remain the same. Please do not use this API without consulting with the
* Team team.
* </p>
- *
+ *
* @since 3.6
* @noextend This interface is not intended to be extended by clients.
*/
@@ -55,7 +55,7 @@ public interface IBundleImporterDelegate {
* headers and values) can be imported into a workspace project. A
* <code>null</code> entry in the returned array indicates the corresponding
* bundle cannot be imported by this delegate.
- *
+ *
* @param manifests
* array of maps containing manifest headers and values of the
* associated bundles
@@ -68,7 +68,7 @@ public interface IBundleImporterDelegate {
* Imports bundles into the workspace creating a project for each import
* description. Reports progress to the given monitor, if not
* <code>null</code>.
- *
+ *
* @param descriptions
* description of bundles to import
* @param monitor
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
index c60913df0..93126e48d 100644
--- 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
@@ -32,7 +32,7 @@ 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.
@@ -63,7 +63,7 @@ public abstract class ChangeTracker {
}
}
}
-
+
/**
* When a project is shared, start tracking it if it is of interest.
* @param provider the repository provider
@@ -84,7 +84,7 @@ public abstract class ChangeTracker {
stopTrackingProject(project);
}
}
-
+
/**
* Create a change tracker
*/
@@ -93,7 +93,7 @@ public abstract class ChangeTracker {
}
/**
- * Start tracking changes. This registers listeners with the workspace
+ * Start tracking changes. This registers listeners with the workspace
* and team.
*/
public void start() {
@@ -130,7 +130,7 @@ public abstract class ChangeTracker {
});
} catch (CoreException e) {
TeamPlugin.log(e);
- }
+ }
return (IResource[]) result.toArray(new IResource[result.size()]);
}
@@ -164,7 +164,7 @@ public abstract class ChangeTracker {
/**
* 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
+ * 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.
@@ -191,7 +191,7 @@ public abstract class ChangeTracker {
protected abstract void handleChanges(IProject project, IResource[] resources);
/**
- * Resources of interest in the given project have changed but the
+ * 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
@@ -248,7 +248,7 @@ public abstract class ChangeTracker {
protected void projectTracked(IProject project) {
handleProjectChange(project);
}
-
+
/**
* Group the given modified file into a change set with the given name.
* @param project the project
@@ -266,9 +266,9 @@ public abstract class ChangeTracker {
private IChangeGroupingRequestor getCollector(IProject project) {
return (IChangeGroupingRequestor)trackedProjects.get(project);
}
-
+
/**
- * Return whether the given file is modified with respect to the
+ * 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
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
index 2649ddf86..6a267a052 100644
--- 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
@@ -34,12 +34,12 @@ import org.eclipse.team.internal.core.mapping.IStreamMergerDelegate;
* <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.
@@ -49,14 +49,14 @@ public class DelegatingStorageMerger implements IStorageMerger {
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.
@@ -68,7 +68,7 @@ public class DelegatingStorageMerger implements IStorageMerger {
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)
*/
@@ -112,7 +112,7 @@ public class DelegatingStorageMerger implements IStorageMerger {
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)
+ if (type == Team.TEXT)
merger = createTextMerger();
if (merger == null) {
// As a last resort, look for a stream merger
@@ -133,10 +133,10 @@ public class DelegatingStorageMerger implements IStorageMerger {
}
/**
- * Return the Team content type associated with the given
+ * 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
+ * @return the Team content type associated with the given
* target
* @see Team#getFileContentManager()
* @see IFileContentManager#getType(IStorage)
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
index a084bbc0a..3b7e4fbff 100644
--- 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
@@ -16,7 +16,7 @@ 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
+ * 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:
@@ -34,7 +34,7 @@ import org.eclipse.core.runtime.CoreException;
* @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.
@@ -47,7 +47,7 @@ public interface IChangeGroupingRequestor {
/**
* 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
+ * 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
@@ -55,5 +55,5 @@ public interface IChangeGroupingRequestor {
* 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
index 8a28a5bbb..0d7b12bf0 100644
--- 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
@@ -35,7 +35,7 @@ import org.eclipse.team.core.mapping.provider.MergeContext;
* also call {@link IJobManager#join(Object, IProgressMonitor)} if they wish to
* wait until all background handlers related to this context are finished.
* </p>
- *
+ *
* @see IResourceMappingMerger
* @see MergeContext
* @since 3.2
@@ -58,7 +58,7 @@ public interface IMergeContext extends ISynchronizationContext {
* 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
@@ -85,7 +85,7 @@ public interface IMergeContext extends ISynchronizationContext {
* 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.
@@ -98,7 +98,7 @@ public interface IMergeContext extends ISynchronizationContext {
/**
* 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
+ * 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
@@ -109,7 +109,7 @@ public interface IMergeContext extends ISynchronizationContext {
* 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.
@@ -118,7 +118,7 @@ public interface IMergeContext extends ISynchronizationContext {
*/
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
@@ -174,7 +174,7 @@ public interface IMergeContext extends ISynchronizationContext {
* 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
@@ -185,7 +185,7 @@ public interface IMergeContext extends ISynchronizationContext {
* 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
@@ -196,7 +196,7 @@ public interface IMergeContext extends ISynchronizationContext {
* 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
@@ -205,7 +205,7 @@ public interface IMergeContext extends ISynchronizationContext {
* 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
@@ -215,7 +215,7 @@ public interface IMergeContext extends ISynchronizationContext {
* 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
@@ -224,7 +224,7 @@ public interface IMergeContext extends ISynchronizationContext {
* {@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
@@ -235,12 +235,12 @@ public interface IMergeContext extends ISynchronizationContext {
* <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
@@ -271,7 +271,7 @@ public interface IMergeContext extends ISynchronizationContext {
* 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
@@ -289,24 +289,24 @@ public interface IMergeContext extends ISynchronizationContext {
* 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
+ * 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
+ * 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
@@ -314,7 +314,7 @@ public interface IMergeContext extends ISynchronizationContext {
* 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
@@ -331,9 +331,9 @@ public interface IMergeContext extends ISynchronizationContext {
* 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) }
+ * {@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
@@ -345,9 +345,9 @@ public interface IMergeContext extends ISynchronizationContext {
* 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) }
+ * {@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
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
index 4fa4f29c2..dfa797a2f 100644
--- 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
@@ -22,10 +22,10 @@ import org.eclipse.team.core.mapping.provider.MergeStatus;
* 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
* @see MergeStatus
- *
+ *
* @since 3.2
* @noimplement This interface is not intended to be implemented by clients.
*/
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
index 867456673..575c2dd7a 100644
--- 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
@@ -20,9 +20,9 @@ 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.
- *
+ *
* @see IDiffTree
- *
+ *
* @since 3.2
* @noimplement This interface is not intended to be implemented by clients.
* Clients that need to create deltas should instead use or
@@ -33,49 +33,49 @@ 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
+ * 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.
- *
+ * 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
+ * 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
+ * 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
*/
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
index 590380793..7a30884b4 100644
--- 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
@@ -22,7 +22,7 @@ import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
* 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.
- *
+ *
* @since 3.2
* @noimplement This interface is not intended to be implemented by clients.
* Clients can use {@link ResourceDiffTree} instead.
@@ -32,7 +32,7 @@ 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.
@@ -42,7 +42,7 @@ public interface IResourceDiffTree extends IDiffTree {
/**
* 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
*/
@@ -52,14 +52,14 @@ public interface IResourceDiffTree extends IDiffTree {
* 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
@@ -69,18 +69,18 @@ public interface IResourceDiffTree extends IDiffTree {
/**
* 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
@@ -94,7 +94,7 @@ public interface IResourceDiffTree extends IDiffTree {
* diff tree
*/
IResource[] getAffectedResources();
-
+
/**
* Return whether the this diff tree contains any diffs that match the given filter
* within the given traversals.
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
index f7659e34e..b01bd2b82 100644
--- 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
@@ -19,11 +19,11 @@ import org.eclipse.core.runtime.jobs.ISchedulingRule;
* 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>IStorageMerger</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) {
@@ -31,13 +31,13 @@ import org.eclipse.core.runtime.jobs.ISchedulingRule;
* ...
* }
* </pre>
- *
+ *
* @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
* @noimplement This interface is not intended to be implemented by clients.
* Client should subclass {@link ResourceMappingMerger} instead.
@@ -69,7 +69,7 @@ public interface IResourceMappingMerger {
* 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>.
@@ -83,10 +83,10 @@ public interface IResourceMappingMerger {
*/
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
+ * all the changes that apply to this merger in the given
* context. When calling {@link #merge(IMergeContext, IProgressMonitor)},
* clients must ensure that they either have obtained
* a rule that covers the rule returned by this method or
@@ -97,9 +97,9 @@ public interface IResourceMappingMerger {
* model provider.
*/
public ISchedulingRule getMergeRule(IMergeContext context);
-
+
/**
- * Validate an auto-merge for the given context. This
+ * 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
@@ -114,7 +114,7 @@ public interface IResourceMappingMerger {
* 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>.
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
index f6059f5b7..b873f04ac 100644
--- 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
@@ -23,7 +23,7 @@ import org.eclipse.core.runtime.*;
* 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 {
@@ -32,25 +32,25 @@ 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>.
+ * 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}.
@@ -58,7 +58,7 @@ public interface IStorageMerger {
* <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
@@ -71,7 +71,7 @@ public interface IStorageMerger {
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. This is typically not possible but may be
@@ -81,5 +81,5 @@ public interface IStorageMerger {
* 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
index 6657a29c2..6f29354ea 100644
--- 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
@@ -50,10 +50,10 @@ import org.eclipse.team.core.mapping.provider.SynchronizationContext;
* {@link IJobManager#join(Object, IProgressMonitor)} if they wish to wait until
* all background handlers related to this context are finished.
* </p>
- *
+ *
* @see SynchronizationContext
* @see MergeContext
- *
+ *
* @since 3.2
* @noimplement This interface is not intended to be implemented by clients.
* They should subclass {@link SynchronizationContext} or one of
@@ -78,7 +78,7 @@ public interface ISynchronizationContext {
* 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();
@@ -97,7 +97,7 @@ public interface ISynchronizationContext {
* {@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[])
@@ -113,9 +113,9 @@ public interface ISynchronizationContext {
* 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
*/
@@ -147,12 +147,12 @@ public interface ISynchronizationContext {
* 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
+ * <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
@@ -192,7 +192,7 @@ public interface ISynchronizationContext {
* 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
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
index 120a804c0..17b2dd4e7 100644
--- 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
@@ -18,10 +18,10 @@ 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.
- *
+ *
* @see org.eclipse.core.resources.mapping.ResourceMapping
* @see ISynchronizationScopeManager
- *
+ *
* @since 3.2
* @noimplement This interface is not intended to be implemented by clients.
* Instead, clients should use a
@@ -29,7 +29,7 @@ import org.eclipse.core.resources.mapping.*;
* mapping scope from a set of input resource mappings.
*/
public interface ISynchronizationScope {
-
+
/**
* Return the projects that bound this scope.
* The projects returned will depend on the type of context used
@@ -40,31 +40,31 @@ public interface ISynchronizationScope {
* @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.
@@ -80,7 +80,7 @@ public interface ISynchronizationScope {
* 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();
@@ -90,7 +90,7 @@ public interface ISynchronizationScope {
* 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();
@@ -102,7 +102,7 @@ public interface ISynchronizationScope {
* @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
@@ -111,29 +111,29 @@ public interface ISynchronizationScope {
* @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)
@@ -143,7 +143,7 @@ public interface ISynchronizationScope {
/**
* 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
*/
@@ -152,15 +152,15 @@ public interface ISynchronizationScope {
/**
* 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();
@@ -168,7 +168,7 @@ public interface ISynchronizationScope {
/**
* 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
*/
@@ -182,7 +182,7 @@ public interface ISynchronizationScope {
* 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
@@ -192,7 +192,7 @@ public interface ISynchronizationScope {
* @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}
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
index e6aee8056..1c199feb0 100644
--- 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
@@ -20,9 +20,9 @@ import org.eclipse.core.resources.mapping.ResourceTraversal;
* <p>
* Clients may implement this interface.
* </p>
- *
+ *
* @see ISynchronizationScope
- *
+ *
* @since 3.2
*/
public interface ISynchronizationScopeChangeListener extends EventListener {
@@ -62,7 +62,7 @@ public interface ISynchronizationScopeChangeListener extends EventListener {
* 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
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
index 202a19b67..fdf3767c3 100644
--- 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
@@ -23,17 +23,17 @@ import org.eclipse.team.core.mapping.provider.SynchronizationScopeManager;
* 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.
- *
+ *
* @see org.eclipse.core.resources.mapping.ResourceMapping
* @see SynchronizationScopeManager
* @see ISynchronizationScopeParticipant
- *
+ *
* @since 3.2
* @noimplement This interface is not intended to be implemented by clients.
* Clients can instead subclass {@link SynchronizationScopeManager}
*/
public interface ISynchronizationScopeManager {
-
+
/**
* Return the scope that is managed by this manager.
* @return the scope that is managed by this manager
@@ -45,7 +45,7 @@ public interface ISynchronizationScopeManager {
* @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.
@@ -54,17 +54,17 @@ public interface ISynchronizationScopeManager {
* 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
+ * 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
@@ -76,7 +76,7 @@ public interface ISynchronizationScopeManager {
/**
* 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
+ * responsibility of the client that creates a scope manager
* to dispose 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
index dc0d121f3..c1ec4a21b 100644
--- 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
@@ -19,13 +19,13 @@ import org.eclipse.core.resources.mapping.ResourceMapping;
* 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 {
@@ -39,12 +39,12 @@ public interface ISynchronizationScopeParticipant {
* 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
+ * @param projects
* projects that were either added or removed
* @return the resource mappings that need to be refreshed.
*/
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
index a7f28e2bc..5abce4e1d 100644
--- 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
@@ -21,7 +21,7 @@ import org.eclipse.core.runtime.IAdapterManager;
* mechanism.
* <p>
* This interface may be implemented by clients.
- *
+ *
* @see ModelProvider
* @see IAdaptable
* @see IAdapterManager
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
index 85f674245..41c4ffcc8 100644
--- 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
@@ -27,12 +27,12 @@ import org.eclipse.team.core.mapping.provider.MergeStatus;
* 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 {
@@ -43,15 +43,15 @@ public abstract class ResourceMappingMerger implements IResourceMappingMerger {
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
+ * 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.
@@ -78,14 +78,14 @@ public abstract class ResourceMappingMerger implements IResourceMappingMerger {
}
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
+ * @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 {
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
index 250c88ad0..12d86f93c 100644
--- 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
@@ -31,7 +31,7 @@ import org.eclipse.team.internal.core.mapping.SyncInfoToDiffConverter;
* 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
*/
@@ -39,12 +39,12 @@ public abstract class MergeContext extends SynchronizationContext implements IMe
/**
* Create a merge context.
- * @param type
+ * @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)
*/
@@ -58,7 +58,7 @@ public abstract class MergeContext extends SynchronizationContext implements IMe
}
}, 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)
*/
@@ -72,7 +72,7 @@ public abstract class MergeContext extends SynchronizationContext implements IMe
}
}, 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)
*/
@@ -104,7 +104,7 @@ public abstract class MergeContext extends SynchronizationContext implements IMe
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)
*/
@@ -116,14 +116,14 @@ public abstract class MergeContext extends SynchronizationContext implements IMe
IThreeWayDiff twd = (IThreeWayDiff) diff;
if ((ignoreLocalChanges || getMergeType() == TWO_WAY)
&& resource.getType() == IResource.FOLDER
- && twd.getKind() == IDiff.ADD
+ && 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.getKind() == IDiff.ADD
&& twd.getDirection() == IThreeWayDiff.INCOMING) {
ensureParentsExist(resource, monitor);
((IFolder)resource).create(false, true, monitor);
@@ -161,14 +161,14 @@ public abstract class MergeContext extends SynchronizationContext implements IMe
// 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
+ // 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;
}
-
+
}
/**
@@ -200,7 +200,7 @@ public abstract class MergeContext extends SynchronizationContext implements IMe
IStorage ancestorStorage;
if (ancestorState != null)
ancestorStorage = ancestorState.getStorage(Policy.subMonitorFor(monitor, 30));
- else
+ else
ancestorStorage = null;
IStorage remoteStorage = remoteState.getStorage(Policy.subMonitorFor(monitor, 30));
OutputStream os = getTempOutputStream(file);
@@ -238,7 +238,7 @@ public abstract class MergeContext extends SynchronizationContext implements IMe
if (tmpFile.exists())
tmpFile.delete();
}
-
+
private OutputStream getTempOutputStream(IFile file) throws CoreException {
File tmpFile = getTempFile(file);
if (tmpFile.exists())
@@ -253,7 +253,7 @@ public abstract class MergeContext extends SynchronizationContext implements IMe
return new ByteArrayOutputStream();
}
}
-
+
private InputStream getTempInputStream(IFile file, OutputStream output) throws CoreException {
if (output instanceof ByteArrayOutputStream) {
ByteArrayOutputStream baos = (ByteArrayOutputStream) output;
@@ -274,11 +274,11 @@ public abstract class MergeContext extends SynchronizationContext implements IMe
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());
}
@@ -292,7 +292,7 @@ public abstract class MergeContext extends SynchronizationContext implements IMe
* 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
@@ -316,13 +316,13 @@ public abstract class MergeContext extends SynchronizationContext implements IMe
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
@@ -332,7 +332,7 @@ public abstract class MergeContext extends SynchronizationContext implements IMe
* 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
@@ -398,7 +398,7 @@ public abstract class MergeContext extends SynchronizationContext implements IMe
((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}.
@@ -407,7 +407,7 @@ public abstract class MergeContext extends SynchronizationContext implements IMe
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 if it exists
* and the first existing parent if the resource does not exist.
@@ -433,7 +433,7 @@ public abstract class MergeContext extends SynchronizationContext implements IMe
}
return rule;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.mapping.IMergeContext#getMergeRule(org.eclipse.team.core.diff.IDiff[])
*/
@@ -450,14 +450,14 @@ public abstract class MergeContext extends SynchronizationContext implements IMe
}
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();
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
index 1583e3d79..2a35b63bf 100644
--- 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
@@ -17,20 +17,20 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.team.core.mapping.IMergeStatus;
/**
- * A special status that is returned when the return code
+ * 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
+ * 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;
@@ -64,7 +64,7 @@ public class MergeStatus extends Status implements IMergeStatus {
public ResourceMapping[] getConflictingMappings() {
return conflictingMappings;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.IMergeStatus#getConflictingFiles()
*/
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
index 626e7adb5..3817873be 100644
--- 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
@@ -20,7 +20,7 @@ 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 {
@@ -76,7 +76,7 @@ public class ResourceDiff extends TwoWayDiff implements IResourceDiff {
public IResource getResource() {
return resource;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.diff.provider.Diff#equals(java.lang.Object)
*/
@@ -86,8 +86,8 @@ public class ResourceDiff extends TwoWayDiff implements IResourceDiff {
if (super.equals(obj)) {
if (obj instanceof ResourceDiff) {
ResourceDiff other = (ResourceDiff) obj;
- return getResource().equals(getResource())
- && revisionsEqual(getBeforeState(), other.getBeforeState())
+ return getResource().equals(getResource())
+ && revisionsEqual(getBeforeState(), other.getBeforeState())
&& revisionsEqual(getAfterState(), other.getAfterState());
}
}
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
index 9b230161e..dd2571a03 100644
--- 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
@@ -23,7 +23,7 @@ import org.eclipse.team.core.mapping.IResourceDiffTree;
/**
* Implementation of {@link IResourceDiffTree}.
- *
+ *
* @since 3.2
* @noextend This class is not intended to be subclassed by clients.
*/
@@ -52,7 +52,7 @@ public class ResourceDiffTree extends DiffTree implements IResourceDiffTree {
Assert.isLegal(false);
return null;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.diff.IResourceDiffTree#getDiff(org.eclipse.core.resources.IResource)
*/
@@ -104,7 +104,7 @@ public class ResourceDiffTree extends DiffTree implements IResourceDiffTree {
}
return (IDiff[]) result.toArray(new IDiff[result.size()]);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.mapping.IResourceDiffTree#getDiffs(org.eclipse.core.resources.IResource, int)
*/
@@ -161,7 +161,7 @@ public class ResourceDiffTree extends DiffTree implements IResourceDiffTree {
}
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)
*/
@@ -169,7 +169,7 @@ public class ResourceDiffTree extends DiffTree implements IResourceDiffTree {
Assert.isTrue(delta instanceof IResourceDiff || delta instanceof IThreeWayDiff);
super.add(delta);
}
-
+
/**
* Remove the diff associated with the given resource from
* the tree.
@@ -189,7 +189,7 @@ public class ResourceDiffTree extends DiffTree implements IResourceDiffTree {
}
return false;
}
-
+
});
} catch (RuntimeException e) {
if (e == found)
@@ -197,5 +197,5 @@ public class ResourceDiffTree extends DiffTree implements IResourceDiffTree {
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
index c88029aa5..627e5afc6 100644
--- 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
@@ -22,7 +22,7 @@ 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
*/
@@ -44,7 +44,7 @@ public abstract class SynchronizationContext extends PlatformObject implements I
this.type = type;
this.diffTree = diffTree;
}
-
+
/**
* {@inheritDoc}
*/
@@ -59,7 +59,7 @@ public abstract class SynchronizationContext extends PlatformObject implements I
public ISynchronizationScopeManager getScopeManager() {
return manager;
}
-
+
/**
* {@inheritDoc}
*/
@@ -86,14 +86,14 @@ public abstract class SynchronizationContext extends PlatformObject implements I
}
return cache;
}
-
+
/**
* {@inheritDoc}
*/
public IResourceDiffTree getDiffTree() {
return diffTree;
}
-
+
/**
* {@inheritDoc}
*/
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
index ede9bd2b0..997b0604a 100644
--- 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
@@ -49,10 +49,10 @@ import org.eclipse.team.internal.core.mapping.*;
* scopes to provide for participation. For example, the
* {@link SubscriberScopeManager} class includes participates in the scope
* management process.
- *
+ *
* @see org.eclipse.core.resources.mapping.ResourceMapping
* @see SubscriberScopeManager
- *
+ *
* @since 3.2
*/
public class SynchronizationScopeManager extends PlatformObject implements ISynchronizationScopeManager {
@@ -90,7 +90,7 @@ public class SynchronizationScopeManager extends PlatformObject implements ISync
}
return (ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]);
}
-
+
private static ResourceMapping[] getMappings(IModelProviderDescriptor descriptor,
ResourceTraversal[] traversals,
ResourceMappingContext context, IProgressMonitor monitor)
@@ -100,9 +100,9 @@ public class SynchronizationScopeManager extends PlatformObject implements ISync
return descriptor.getModelProvider().getMappings(matchingTraversals,
context, monitor);
}
-
+
/**
- * Create a scope manager that uses the given context to
+ * 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
@@ -125,12 +125,12 @@ public class SynchronizationScopeManager extends PlatformObject implements ISync
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
*/
@@ -143,12 +143,12 @@ public class SynchronizationScopeManager extends PlatformObject implements ISync
if (modelObject instanceof IResource) {
IResource resource = (IResource) modelObject;
if (resource.getType() == IResource.ROOT)
- // If the workspace root is one of the inputs,
+ // 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
+ // 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();
@@ -156,7 +156,7 @@ public class SynchronizationScopeManager extends PlatformObject implements ISync
}
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)
*/
@@ -183,7 +183,7 @@ public class SynchronizationScopeManager extends PlatformObject implements ISync
}, getSchedulingRule(), IResource.NONE, monitor);
return traversals[0];
}
-
+
private void internalPrepareContext(IProgressMonitor monitor) throws CoreException {
if (initialized)
return;
@@ -202,7 +202,7 @@ public class SynchronizationScopeManager extends PlatformObject implements ISync
if (newTraversals.length > 0 && consultModels) {
ResourceTraversal[] adjusted = adjustInputTraversals(newTraversals);
targetMappings = getMappingsFromProviders(adjusted,
- context,
+ context,
Policy.subMonitorFor(monitor, IProgressMonitor.UNKNOWN));
if (firstTime) {
firstTime = false;
@@ -240,7 +240,7 @@ public class SynchronizationScopeManager extends PlatformObject implements ISync
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
@@ -248,7 +248,7 @@ public class SynchronizationScopeManager extends PlatformObject implements ISync
internalRefreshScope(scope.getInputMappings(), false, monitor);
change.setContracted(true);
}
-
+
if (change.shouldFireChange())
fireMappingsChangedEvent(change.getChangedMappings(), change.getChangedTraversals(refreshTraversals));
monitor.done();
@@ -328,7 +328,7 @@ public class SynchronizationScopeManager extends PlatformObject implements ISync
/**
* 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
*/
@@ -340,14 +340,14 @@ public class SynchronizationScopeManager extends PlatformObject implements ISync
/**
* 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.
@@ -369,7 +369,7 @@ public class SynchronizationScopeManager extends PlatformObject implements ISync
* 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
@@ -400,7 +400,7 @@ public class SynchronizationScopeManager extends PlatformObject implements ISync
* 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
@@ -443,7 +443,7 @@ public class SynchronizationScopeManager extends PlatformObject implements ISync
public ISynchronizationScope getScope() {
return scope;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.mapping.IResourceMappingScopeManager#dispose()
*/
@@ -453,7 +453,7 @@ public class SynchronizationScopeManager extends PlatformObject implements ISync
}
/**
- * Refresh the given mappings by recalculating the traversals for the
+ * Refresh the given mappings by recalculating the traversals for the
* mappings and adjusting the scope accordingly.
* @param mappings the mappings to be refreshed
*/
@@ -468,7 +468,7 @@ public class SynchronizationScopeManager extends PlatformObject implements ISync
}
/**
- * Returns the human readable name of this manager. The name is never
+ * Returns the human readable name of this manager. The name is never
* <code>null</code>.
* @return the name associated with this scope manager
*/
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
index 1b77c4f89..222a1b45d 100644
--- 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
@@ -15,7 +15,7 @@ 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>
- *
+ *
* @see ISubscriberChangeListener
* @since 3.0
* @noimplement Clients are not intended to implement. Instead subclass
@@ -45,11 +45,11 @@ public interface ISubscriberChangeEvent {
* @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
+ * flags to determine whether the change event is of
* a particular type. For example,
* <pre>
* if (event.getFlags() & ISubscriberChangeEvent.SYNC_CHANGED) {
@@ -59,7 +59,7 @@ public interface ISubscriberChangeEvent {
* @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.
@@ -67,7 +67,7 @@ public interface ISubscriberChangeEvent {
* 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
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
index 1e3b054bc..6d9e17272 100644
--- 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
@@ -14,7 +14,7 @@ import java.util.EventListener;
/**
* A subscriber change listener is notified of changes to resources
- * regarding their subscriber synchronization state.
+ * regarding their subscriber synchronization state.
* <p>
* Clients may implement this interface.
* </p>
@@ -22,11 +22,11 @@ import java.util.EventListener;
* @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
+ * 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
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
index 3c30494da..ee7df0f17 100644
--- 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
@@ -30,34 +30,34 @@ 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.
+ * 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
+ * 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
+ * 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,
+ * 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
+ * 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 are added
- * or removed. For example, a subscriber for a repository provider would fire a root added event when a project
+ * after a delta will indicate that the file has an outgoing change. The subscriber must also notify listeners
+ * when roots are 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
+ * 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 <code>IResource</code> deltas.
* </p><p>
- * The remote and base states can also include the state for resources that do not exist locally (i.e outgoing deletions
+ * 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>
@@ -70,7 +70,7 @@ abstract public class Subscriber {
/**
* 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();
@@ -82,11 +82,11 @@ abstract public class Subscriber {
* 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
+ * @throws TeamException
*/
abstract public boolean isSupervised(IResource resource) throws TeamException;
@@ -101,7 +101,7 @@ abstract public class Subscriber {
* </p>
* @param resource the resource
* @return a list of member resources
- * @throws TeamException
+ * @throws TeamException
*/
abstract public IResource[] members(IResource resource) throws TeamException;
@@ -110,7 +110,7 @@ abstract public class Subscriber {
* 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();
@@ -134,23 +134,23 @@ abstract public class Subscriber {
* 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
+ * @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
@@ -221,7 +221,7 @@ abstract public class Subscriber {
/**
* Removes a listener previously registered with this team subscriber. Has
* no effect if an identical listener is not registered.
- *
+ *
* @param listener a team resource change listener
*/
public void removeListener(ISubscriberChangeListener listener) {
@@ -229,7 +229,7 @@ abstract public class Subscriber {
listeners.remove(listener);
}
}
-
+
/**
* Adds all out-of-sync resources (<code>getKind() != SyncInfo.IN_SYNC</code>) that occur
* under the given resources to the specified depth. The purpose of this
@@ -263,7 +263,7 @@ abstract public class Subscriber {
monitor.done();
}
}
-
+
/**
* Fires a team resource change event to all registered listeners. Only
* listeners registered at the time this method is called are notified.
@@ -290,7 +290,7 @@ abstract public class Subscriber {
});
}
}
-
+
/*
* Collect the calculated synchronization information for the given resource at the given depth. The
* results are added to the provided list.
@@ -300,9 +300,9 @@ abstract public class Subscriber {
int depth,
SyncInfoSet set,
IProgressMonitor monitor) {
-
+
Policy.checkCanceled(monitor);
-
+
if (resource.getType() != IResource.FILE
&& depth != IResource.DEPTH_ZERO) {
try {
@@ -317,11 +317,11 @@ abstract public class Subscriber {
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));
+ 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() }));
+ 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) {
@@ -333,14 +333,14 @@ abstract public class Subscriber {
}
} 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() }),
+ 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
@@ -360,10 +360,10 @@ abstract public class Subscriber {
* 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 CoreException
* @throws TeamException if errors occur
* @since 3.2
*/
@@ -373,7 +373,7 @@ abstract public class Subscriber {
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:
@@ -386,7 +386,7 @@ abstract public class Subscriber {
* </ul>
* @param traversals the traversals to be visited
* @param visitor the visitor
- * @throws CoreException
+ * @throws CoreException
* @throws TeamException if errors occur
* @since 3.2
*/
@@ -396,7 +396,7 @@ abstract public class Subscriber {
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:
@@ -407,7 +407,7 @@ abstract public class Subscriber {
* <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
@@ -467,7 +467,7 @@ abstract public class Subscriber {
}
monitor.done();
}
-
+
/**
* Return the synchronization state of the given resource mapping.
* Only return the portion of the synchronization state that matches
@@ -484,13 +484,13 @@ abstract public class Subscriber {
* 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 traversals are deleted. Otherwise {@link IDiff#CHANGE}
- * will be returned.
- *
+ * 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
+ * @throws CoreException
* @since 3.2
* @see IDiff
* @see IThreeWayDiff
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
index dd350db35..ac56cb31d 100644
--- 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
@@ -18,15 +18,15 @@ import org.eclipse.core.resources.IResource;
*
* @see ISubscriberChangeEvent
* @see Subscriber
- *
+ *
* @since 3.0
*/
public class SubscriberChangeEvent implements ISubscriberChangeEvent {
- private Subscriber subscriber;
+ private Subscriber subscriber;
private int flags;
- private IResource resource;
-
+ 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
@@ -59,7 +59,7 @@ public class SubscriberChangeEvent implements ISubscriberChangeEvent {
public Subscriber getSubscriber() {
return subscriber;
}
-
+
/**
* Returns an array of deltas for the resources with <code>ISubscriberChangeEvent.SYNC_CHANGED</code>
* as the flag.
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
index 32b9c6521..7ff35bd3f 100644
--- 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
@@ -26,10 +26,10 @@ 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 {
@@ -37,7 +37,7 @@ 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
@@ -63,7 +63,7 @@ public abstract class SubscriberMergeContext extends MergeContext {
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
@@ -84,7 +84,7 @@ public abstract class SubscriberMergeContext extends MergeContext {
handler.initializeIfNeeded();
subscriber.refresh(traversals, monitor);
}
-
+
private GroupProgressMonitor getGroup(IProgressMonitor monitor) {
if (monitor instanceof GroupProgressMonitor) {
return (GroupProgressMonitor) monitor;
@@ -103,7 +103,7 @@ public abstract class SubscriberMergeContext extends MergeContext {
handler.shutdown();
super.dispose();
}
-
+
/**
* Return the sync info for the given resource.
* @param resource the resource
@@ -121,7 +121,7 @@ public abstract class SubscriberMergeContext extends MergeContext {
public Subscriber getSubscriber() {
return subscriber;
}
-
+
/**
* Run the given runnable when the background handler
* for this context is idle. The given runnable should not lock
@@ -131,7 +131,7 @@ public abstract class SubscriberMergeContext extends MergeContext {
protected void runInBackground(IWorkspaceRunnable runnable) {
handler.run(runnable, false);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.core.runtime.PlatformObject#getAdapter(java.lang.Class)
*/
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
index 763c6adea..9aaadbf66 100644
--- 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
@@ -22,7 +22,7 @@ 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
+ * 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,
@@ -30,14 +30,14 @@ import org.eclipse.team.internal.core.*;
* @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
@@ -48,7 +48,7 @@ public class SubscriberResourceMappingContext extends RemoteResourceMappingConte
public static RemoteResourceMappingContext createContext(Subscriber subscriber) {
return new SubscriberResourceMappingContext(subscriber, true);
}
-
+
/**
* Create a resource mapping context for the given subscriber
* @param subscriber the subscriber
@@ -76,7 +76,7 @@ public class SubscriberResourceMappingContext extends RemoteResourceMappingConte
monitor.done();
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.core.internal.resources.mapping.RemoteResourceMappingContext#hasLocalChange(org.eclipse.core.resources.IResource, org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -104,7 +104,7 @@ public class SubscriberResourceMappingContext extends RemoteResourceMappingConte
monitor.done();
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.core.internal.resources.mapping.RemoteResourceMappingContext#fetchBaseContents(org.eclipse.core.resources.IFile, org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -180,13 +180,13 @@ public class SubscriberResourceMappingContext extends RemoteResourceMappingConte
IResource resource = resources[i];
// Include files and depth-one folders as shallow
if (depth == IResource.DEPTH_ONE || resource.getType() == IResource.FILE) {
- shallowRefresh.add(resource);
+ 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.
@@ -214,7 +214,7 @@ public class SubscriberResourceMappingContext extends RemoteResourceMappingConte
* direct parent if the resource is a file.
*/
private boolean wasRefreshedShallow(IResource resource) {
- if (shallowRefresh.contains(resource))
+ if (shallowRefresh.contains(resource))
return true;
if (resource.getType() == IResource.FILE && shallowRefresh.contains(resource.getParent()))
return true;
@@ -233,7 +233,7 @@ public class SubscriberResourceMappingContext extends RemoteResourceMappingConte
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.
@@ -254,7 +254,7 @@ public class SubscriberResourceMappingContext extends RemoteResourceMappingConte
}
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.
@@ -291,7 +291,7 @@ public class SubscriberResourceMappingContext extends RemoteResourceMappingConte
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();
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
index 5e438ab32..b67c8bc0b 100644
--- 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
@@ -19,7 +19,7 @@ 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 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
@@ -60,7 +60,7 @@ public class SubscriberScopeManager extends SynchronizationScopeManager implemen
protected Subscriber getSubscriber() {
return subscriber;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.mapping.IResourceMappingScopeManager#dispose()
*/
@@ -71,7 +71,7 @@ public class SubscriberScopeManager extends SynchronizationScopeManager implemen
}
super.dispose();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.mapping.provider.ResourceMappingScopeManager#initialize(org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -84,7 +84,7 @@ public class SubscriberScopeManager extends SynchronizationScopeManager implemen
}
}, 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)
*/
@@ -100,11 +100,11 @@ public class SubscriberScopeManager extends SynchronizationScopeManager implemen
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
+ * 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() {
@@ -119,7 +119,7 @@ public class SubscriberScopeManager extends SynchronizationScopeManager implemen
}
}
}
-
+
/*
* Obtain a participant through the factory which is obtained using IAdaptable
*/
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
index 188753963..a74dbc946 100644
--- 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
@@ -16,7 +16,7 @@ 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
@@ -26,7 +26,7 @@ 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>,
@@ -41,7 +41,7 @@ public class FastSyncInfoFilter extends SyncInfoFilter {
/**
* An abstract class which contains a set of <code>FastSyncInfoFilter</code> instances.
* Subclasses must provide the <code>select(SyncInfo)</code> method for determining
- * matches.
+ * matches.
*/
public static abstract class CompoundSyncInfoFilter extends FastSyncInfoFilter {
/**
@@ -56,7 +56,7 @@ public class FastSyncInfoFilter extends SyncInfoFilter {
this.filters = filters;
}
}
-
+
/**
* Selects <code>SyncInfo</code> which match all child filters.
*/
@@ -105,7 +105,7 @@ public class FastSyncInfoFilter extends SyncInfoFilter {
return info.getKind() != 0 && (info.getKind() & SyncInfo.PSEUDO_CONFLICT) == 0;
}
}
-
+
/**
* Selects <code>SyncInfo</code> that match any of the child filters.
*/
@@ -130,9 +130,9 @@ public class FastSyncInfoFilter extends SyncInfoFilter {
return false;
}
}
-
+
/**
- * Selects <code>SyncInfo</code> whose change type match those of the filter.
+ * 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};
@@ -169,8 +169,8 @@ public class FastSyncInfoFilter extends SyncInfoFilter {
}
/**
- * Selects <code>SyncInfo</code> whose change direction match those of the filter.
- */
+ * 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};
/**
@@ -208,14 +208,14 @@ public class FastSyncInfoFilter extends SyncInfoFilter {
/**
* 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)
*/
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
index e8caceedb..a29d7fd52 100644
--- 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
@@ -13,15 +13,15 @@ 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
+ * 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.
+ * 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
+ * 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>
@@ -32,37 +32,37 @@ import org.eclipse.core.resources.IResource;
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
+ * 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
+ *
+ * @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
+ *
+ * @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
index 11ec9d341..6491ca2e9 100644
--- 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
@@ -22,7 +22,7 @@ import org.eclipse.team.core.ITeamStatus;
* 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
+ * 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.
@@ -31,13 +31,13 @@ import org.eclipse.team.core.ITeamStatus;
* @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
+ * 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
@@ -48,8 +48,8 @@ public interface ISyncInfoSetChangeListener {
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
+ * 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.
@@ -61,17 +61,17 @@ public interface ISyncInfoSetChangeListener {
* @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
+ * 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
index 6a614da1d..135a941b6 100644
--- 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
@@ -14,39 +14,39 @@ 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
+ * 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.
+ * 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
+ * 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.
+ * 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
+ * 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
index a9c4eeb3b..8f43e3432 100644
--- 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
@@ -19,20 +19,20 @@ import org.eclipse.team.core.variants.IResourceVariantComparator;
import org.eclipse.team.internal.core.Messages;
/**
- * Describes the synchronization of a <b>local</b> resource
+ * 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.
+ * 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 <code>IN-SYNC</code>, <code>ADDITION</code>,
+ * type. This will be one of <code>IN-SYNC</code>, <code>ADDITION</code>,
* <code>DELETION</code> or <code>CHANGE</code> determined in the following manner.
* <ul>
* <li>A resource is considered an <code>ADDITION</code> if it exists locally and there is no remote.
* <li>A resource is considered an <code>DELETION</code> if it does not exists locally and there is remote.
- * <li>A resource is considered a <code>CHANGE</code> if both the local and remote exist but the
+ * <li>A resource is considered a <code>CHANGE</code> 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 <code>IN_SYNC</code> in all other cases.
@@ -51,7 +51,7 @@ import org.eclipse.team.internal.core.Messages;
* 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
+ * <li>If there are both incoming and outgoing changes, the resource
* is considered a <b>conflicting change</b>.
* </ul>
* Again, the comparison of resources is done using the variant comparator provided
@@ -60,26 +60,26 @@ import org.eclipse.team.internal.core.Messages;
* @since 3.0
*/
public class SyncInfo implements IAdaptable {
-
+
/*====================================================================
- * Constants defining synchronization types:
+ * 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.
*/
@@ -89,55 +89,55 @@ public class SyncInfo implements IAdaptable {
* Bit mask for extracting the change type.
*/
public static final int CHANGE_MASK = CHANGE;
-
+
/*====================================================================
- * Constants defining synchronization direction:
+ * 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.
+ * 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.
+ * 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
+ * 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
+ * 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:
*====================================================================*/
@@ -145,9 +145,9 @@ public class SyncInfo implements IAdaptable {
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.
@@ -163,7 +163,7 @@ public class SyncInfo implements IAdaptable {
this.remote = remote;
this.comparator = comparator;
}
-
+
/**
* Returns the state of the local resource. Note that the
* resource may or may not exist.
@@ -173,12 +173,12 @@ public class SyncInfo implements IAdaptable {
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.
+ * 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;
@@ -188,7 +188,7 @@ public class SyncInfo implements IAdaptable {
* Returns the author of the revision corresponding to the local resource or <code>null</code>
* if it doesn't have one. For example if the local file is shared in CVS this would be the
* revision author.
- *
+ *
* @param monitor the progress monitor
* @return the author of the revision associated with the local file or <code>null</code>
* @since 3.6
@@ -210,7 +210,7 @@ public class SyncInfo implements IAdaptable {
public IResourceVariant getBase() {
return base;
}
-
+
/**
* Returns the handle for the remote resource,
* or <code>null</code> if the remote resource does not exist.
@@ -224,63 +224,63 @@ public class SyncInfo implements IAdaptable {
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
+ * 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
+ * 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)
*/
@@ -291,19 +291,19 @@ public class SyncInfo implements IAdaptable {
}
return false;
}
-
+
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
public int hashCode() {
return getLocal().hashCode();
}
-
- private boolean equalNodes(SyncInfo node1, SyncInfo node2) {
+
+ 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)
@@ -312,7 +312,7 @@ public class SyncInfo implements IAdaptable {
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)
@@ -330,16 +330,16 @@ public class SyncInfo implements IAdaptable {
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)
*/
@@ -349,77 +349,77 @@ public class SyncInfo implements IAdaptable {
}
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;
+ 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;
- }
+ 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; //
+ 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 & 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 }); //
+ 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 });
+ 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) {
+ if (!localExists) {
description = IN_SYNC;
} else {
description = OUTGOING | ADDITION;
@@ -441,7 +441,7 @@ public class SyncInfo implements IAdaptable {
} else {
if (comparator.compare(base, remote))
description = OUTGOING | DELETION;
- else
+ else
description = CONFLICTING | CHANGE;
}
} else {
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
index 299838b86..48af21eea 100644
--- 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
@@ -20,21 +20,21 @@ 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.
+ * contents is subscriber specific.
* <p>
* For folders, the comparison always returns <code>true</code>.
*/
@@ -53,7 +53,7 @@ public abstract class SyncInfoFilter {
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)
*/
@@ -65,7 +65,7 @@ public abstract class SyncInfoFilter {
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
@@ -81,14 +81,14 @@ public abstract class SyncInfoFilter {
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
index 8694a0bd6..8bf17b4ff 100644
--- 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
@@ -27,8 +27,8 @@ import org.eclipse.team.internal.core.subscribers.SyncInfoStatistics;
/**
* 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.
- *
+ * can be accomplished using the <code>beginInput/endInput</code> methods.
+ *
* @see SyncInfoTree
* @see SyncInfo
* @see ISyncInfoSetChangeListener
@@ -41,12 +41,12 @@ public class SyncInfoSet {
// 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.
*/
@@ -56,7 +56,7 @@ public class 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) {
@@ -66,21 +66,21 @@ public class SyncInfoSet {
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() {
@@ -92,11 +92,11 @@ public class SyncInfoSet {
}
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.
@@ -107,12 +107,12 @@ public class SyncInfoSet {
/**
* 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 resources.size();
}
/**
@@ -131,37 +131,37 @@ public class SyncInfoSet {
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);
+ SyncInfo oldSyncInfo = (SyncInfo)resources.put(path, info);
if(oldSyncInfo == null) {
statistics.add(info);
} else {
@@ -169,10 +169,10 @@ public class SyncInfoSet {
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
*/
@@ -185,11 +185,11 @@ public class SyncInfoSet {
}
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) {
@@ -201,7 +201,7 @@ public class SyncInfoSet {
/**
* 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) {
@@ -209,7 +209,7 @@ public class SyncInfoSet {
listeners.remove(listener);
}
}
-
+
/**
* Reset the sync set so it is empty. Listeners are notified of the change.
*/
@@ -227,14 +227,14 @@ public class SyncInfoSet {
/*
* Run the given runnable. This operation
- * will block other threads from modifying the
+ * 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
+ * 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
@@ -252,17 +252,17 @@ public class SyncInfoSet {
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
+ * 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.
+ * implementation.
* </p><p>
* Disconnecting is done by calling <code>removeChangeListener</code>. Once disconnected,
* a listener can reconnect to be re-initialized.
@@ -322,7 +322,7 @@ public class SyncInfoSet {
/**
* 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) {
@@ -339,7 +339,7 @@ public class SyncInfoSet {
/**
* Remove the given local resource from the set.
- *
+ *
* @param resource the local resource to remove
*/
public void remove(IResource resource) {
@@ -354,14 +354,14 @@ public class SyncInfoSet {
/**
* 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]);
+ remove(resources[i]);
}
} finally {
endInput(null);
@@ -391,7 +391,7 @@ public class SyncInfoSet {
/**
* 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
*/
@@ -409,7 +409,7 @@ public class SyncInfoSet {
/**
* 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) {
@@ -430,7 +430,7 @@ public class SyncInfoSet {
/**
* 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) {
@@ -450,7 +450,7 @@ public class SyncInfoSet {
/**
* Return all nodes in this set that match the given filter.
- *
+ *
* @param filter a sync info filter
* @return the nodes that match the filter
*/
@@ -469,7 +469,7 @@ public class SyncInfoSet {
/**
* 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() {
@@ -479,7 +479,7 @@ public class SyncInfoSet {
/**
* 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() {
@@ -488,8 +488,8 @@ public class SyncInfoSet {
/**
* 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
+ * 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>
@@ -519,7 +519,7 @@ public class SyncInfoSet {
public void endInput(IProgressMonitor monitor) {
try {
if (lock.getDepth() == 1) {
- // Remain locked while firing the events so the handlers
+ // 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));
}
@@ -538,7 +538,7 @@ public class SyncInfoSet {
/**
* Create an empty change event. Subclass may override to provided specialized event types
- *
+ *
* @return an empty change event
* @since 3.5
*/
@@ -551,7 +551,7 @@ public class SyncInfoSet {
// send is static
final SyncInfoSetChangeEvent 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;
@@ -600,7 +600,7 @@ public class SyncInfoSet {
/**
* 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.
* @nooverride This method is not intended to be re-implemented or extended
* by clients.
@@ -609,9 +609,9 @@ public class SyncInfoSet {
protected SyncInfoSetChangeEvent getChangeEvent() {
return changes;
}
-
+
/**
- * Add the error to the set. Errors should be added to the set when the client
+ * 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.
@@ -633,11 +633,11 @@ public class SyncInfoSet {
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() {
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoSetChangeEvent.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoSetChangeEvent.java
index 53a431ab6..8c2446182 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoSetChangeEvent.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoSetChangeEvent.java
@@ -17,20 +17,20 @@ import org.eclipse.team.core.ITeamStatus;
/**
* This event keeps track of the changes in a {@link SyncInfoSet}
- *
+ *
* @see SyncInfoSet
* @since 3.5
*/
public class SyncInfoSetChangeEvent 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();
@@ -49,19 +49,19 @@ public class SyncInfoSetChangeEvent implements ISyncInfoSetChangeEvent {
addedResources.put(info.getLocal(), info);
}
}
-
+
public void removed(IResource resource) {
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
+ // 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)) {
@@ -71,7 +71,7 @@ public class SyncInfoSetChangeEvent implements ISyncInfoSetChangeEvent {
}
changedResources.put(resource, info);
}
-
+
public SyncInfo[] getAddedResources() {
return (SyncInfo[]) addedResources.values().toArray(new SyncInfo[addedResources.size()]);
}
@@ -91,11 +91,11 @@ public class SyncInfoSetChangeEvent implements ISyncInfoSetChangeEvent {
public void reset() {
reset = true;
}
-
+
public boolean isReset() {
return reset;
}
-
+
public boolean isEmpty() {
return changedResources.isEmpty() && removedResources.isEmpty() && addedResources.isEmpty() && errors.isEmpty();
}
@@ -103,7 +103,7 @@ public class SyncInfoSetChangeEvent implements ISyncInfoSetChangeEvent {
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/core/synchronize/SyncInfoTree.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoTree.java
index ad8162446..16bfef87c 100644
--- 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
@@ -41,17 +41,17 @@ import org.eclipse.team.internal.core.subscribers.SyncInfoTreeChangeEvent;
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) {
@@ -67,7 +67,7 @@ public class SyncInfoTree extends SyncInfoSet {
* 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.
*/
@@ -146,13 +146,13 @@ public class SyncInfoTree extends SyncInfoSet {
if(info != null) {
infos.add(info);
} else {
- TeamPlugin.log(IStatus.INFO, Messages.SyncInfoTree_0 + child.getFullPath(), null);
+ TeamPlugin.log(IStatus.INFO, Messages.SyncInfoTree_0 + child.getFullPath(), null);
}
}
return (SyncInfo[]) infos.toArray(new SyncInfo[infos.size()]);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.synchronize.SyncInfoSet#createEmptyChangeEvent()
*/
@@ -188,7 +188,7 @@ public class SyncInfoTree extends SyncInfoSet {
} finally {
endInput(null);
}
-
+
}
/* (non-Javadoc)
@@ -297,7 +297,7 @@ public class SyncInfoTree extends SyncInfoSet {
for (int i = 0; i < toRemove.length; i++) {
remove(toRemove[i]);
}
- }
+ }
} finally {
endInput(null);
}
@@ -328,10 +328,10 @@ public class SyncInfoTree extends SyncInfoSet {
}
/**
- * Return the immediate children of the given resource who are either out-of-sync
+ * 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
+ *
+ * @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
*/
@@ -339,7 +339,7 @@ public class SyncInfoTree extends SyncInfoSet {
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
+ // 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();
@@ -352,7 +352,7 @@ public class SyncInfoTree extends SyncInfoSet {
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;
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
index 4fa33e87e..c78c3e953 100644
--- 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
@@ -23,12 +23,12 @@ 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
+ * 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 {
@@ -37,7 +37,7 @@ public abstract class AbstractResourceVariantTree implements IResourceVariantTre
* 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
+ * 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>,
@@ -78,18 +78,18 @@ public abstract class AbstractResourceVariantTree implements IResourceVariantTre
IResource[] changedResources = null;
monitor.beginTask(null, 100);
try {
- monitor.setTaskName(NLS.bind(Messages.SynchronizationCacheRefreshOperation_0, new String[] { resource.getFullPath().makeRelative().toString() }));
-
+ 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
+
+ // 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();
+ sub.done();
}
} finally {
monitor.done();
@@ -117,7 +117,7 @@ public abstract class AbstractResourceVariantTree implements IResourceVariantTre
/**
* 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).
+ * 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.
@@ -127,9 +127,9 @@ public abstract class AbstractResourceVariantTree implements IResourceVariantTre
/**
* 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.
+ * 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
+ * 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
@@ -142,7 +142,7 @@ public abstract class AbstractResourceVariantTree implements IResourceVariantTre
/**
* Method that is invoked during collection to let subclasses know which members
- * were collected for the given resource. Implementors should purge any cached
+ * 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
@@ -170,40 +170,40 @@ public abstract class AbstractResourceVariantTree implements IResourceVariantTre
changedResources.add(local);
}
if (depth == IResource.DEPTH_ZERO) return;
- Map children = mergedMembers(local, remote, monitor);
+ 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,
+ 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);
-
+
+
+ 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++) {
@@ -213,7 +213,7 @@ public abstract class AbstractResourceVariantTree implements IResourceVariantTre
allSet.add(name);
}
}
-
+
if (remoteChildren.length > 0) {
remoteSet = new HashMap(10);
for (int i = 0; i < remoteChildren.length; i++) {
@@ -223,23 +223,23 @@ public abstract class AbstractResourceVariantTree implements IResourceVariantTre
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();
+ boolean isContainer = remoteChild.isContainer();
localChild = getResourceChild(local /* parent */, keyChildName, isContainer);
}
if (localChild == null) {
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
index a451da8e9..f5fd05872 100644
--- 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
@@ -37,20 +37,20 @@ import org.eclipse.team.internal.core.*;
* cache additional resource variant properties such as author, comment, etc.
* </p>
* <p>
- * The <code>IStorage</code> instance returned by this class will be
+ * 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
@@ -60,7 +60,7 @@ public abstract class CachedResourceVariant extends PlatformObject implements IR
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() }));
+ throw new TeamException(NLS.bind(Messages.CachedResourceVariant_0, new String[] { getCachePath() }));
}
return getCachedContents();
}
@@ -82,7 +82,7 @@ public abstract class CachedResourceVariant extends PlatformObject implements IR
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));
+ 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();
@@ -92,7 +92,7 @@ public abstract class CachedResourceVariant extends PlatformObject implements IR
}
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.variants.IResourceVariant#getStorage(org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -104,16 +104,16 @@ public abstract class CachedResourceVariant extends PlatformObject implements IR
}
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
+ * 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>
@@ -124,7 +124,7 @@ public abstract class CachedResourceVariant extends PlatformObject implements IR
/**
* This method should be invoked by subclasses from within their <code>fetchContents</code>
- * method in order to cache the contents for this resource variant.
+ * 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
@@ -137,11 +137,11 @@ public abstract class CachedResourceVariant extends PlatformObject implements IR
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
@@ -159,7 +159,7 @@ public abstract class CachedResourceVariant extends PlatformObject implements IR
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.
@@ -173,17 +173,17 @@ public abstract class CachedResourceVariant extends PlatformObject implements IR
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
+ * 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.
- *
+ *
* @return whether the variant is cached
- * @nooverride This method is not intended to be overridden by clients.
+ * @nooverride This method is not intended to be overridden by clients.
*/
protected boolean isHandleCached() {
return (getCache().hasEntry(getCachePath()));
@@ -201,7 +201,7 @@ public abstract class CachedResourceVariant extends PlatformObject implements IR
* @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
@@ -217,7 +217,7 @@ public abstract class CachedResourceVariant extends PlatformObject implements IR
}
return entry.getSize();
}
-
+
/*
* Return the cache that is used to cache this resource variant and its contents.
* @return Returns the cache.
@@ -226,7 +226,7 @@ public abstract class CachedResourceVariant extends PlatformObject implements IR
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
@@ -241,44 +241,44 @@ public abstract class CachedResourceVariant extends PlatformObject implements IR
* 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.
- *
+ *
* @return a cached copy of this resource variant or <code>null</code>
- * @nooverride This method is not intended to be overridden by clients.
+ * @nooverride This method is not intended to be overridden by clients.
*/
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
+ * 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.
- *
+ *
* @nooverride 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
+ * 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
index 4ff2014b3..9685f54eb 100644
--- 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
@@ -16,35 +16,35 @@ 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
+ * 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
+ *
+ * @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>
+ * 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.
@@ -52,21 +52,21 @@ public interface IResourceVariant {
* 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
+ *
+ * @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
+ * @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
@@ -74,7 +74,7 @@ public interface IResourceVariant {
* @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
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
index c7845f07a..46533428b 100644
--- 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
@@ -13,36 +13,36 @@ package org.eclipse.team.core.variants;
import org.eclipse.core.resources.IResource;
/**
- * An <code>IResourceVariantComparator</code> is provided by a <code>Subscriber</code>
+ * 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>
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
index dd837b223..4c46c4d04 100644
--- 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
@@ -16,7 +16,7 @@ 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.
- *
+ *
* @see AbstractResourceVariantTree
* @see ResourceVariantTree
* @since 3.0
@@ -26,14 +26,14 @@ import org.eclipse.team.core.TeamException;
* {@link ResourceVariantTree}.
*/
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
@@ -43,7 +43,7 @@ public interface IResourceVariantTree {
* @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.
@@ -52,7 +52,7 @@ public interface IResourceVariantTree {
* @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
@@ -60,9 +60,9 @@ public interface IResourceVariantTree {
* @throws TeamException
*/
public boolean hasResourceVariant(IResource resource) throws TeamException;
-
+
/**
- * Refreshes the resource variant tree for the specified resources and possibly
+ * 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>,
@@ -73,7 +73,7 @@ public interface IResourceVariantTree {
* @throws TeamException
*/
public IResource[] refresh(
- IResource[] resources,
+ IResource[] resources,
int depth,
IProgressMonitor monitor) throws TeamException;
@@ -83,7 +83,7 @@ public interface IResourceVariantTree {
* @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
+ * @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
index 218256247..559c7ffcc 100644
--- 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
@@ -19,7 +19,7 @@ import org.eclipse.core.resources.IResource;
* @since 3.0
*/
public interface ISynchronizerChangeListener {
-
+
/**
* Notification of synchronization state changes for the given resources.
* Clients must query the <code>ThreeWaySynchronizer</code> that generated
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
index 3ef3b4c12..9f38007aa 100644
--- 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
@@ -21,16 +21,16 @@ 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.
- *
+ *
* @since 3.0
* @noextend This class is not intended to be subclassed by clients.
*/
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>.
@@ -42,7 +42,7 @@ public class PersistantResourceVariantByteStore extends ResourceVariantByteStore
syncName = name;
getSynchronizer().add(syncName);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.variants.ResourceVariantByteStore#dispose()
*/
@@ -69,7 +69,7 @@ public class PersistantResourceVariantByteStore extends ResourceVariantByteStore
}
return syncBytes;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.variants.ResourceVariantByteStore#setBytes(org.eclipse.core.resources.IResource, byte[])
*/
@@ -101,7 +101,7 @@ public class PersistantResourceVariantByteStore extends ResourceVariantByteStore
}
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
@@ -114,9 +114,9 @@ public class PersistantResourceVariantByteStore extends ResourceVariantByteStore
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
+ * 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>.
@@ -132,7 +132,7 @@ public class PersistantResourceVariantByteStore extends ResourceVariantByteStore
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 */);
@@ -152,7 +152,7 @@ public class PersistantResourceVariantByteStore extends ResourceVariantByteStore
private ISynchronizer getSynchronizer() {
return ResourcesPlugin.getWorkspace().getSynchronizer();
}
-
+
private byte[] internalGetSyncBytes(IResource resource) throws TeamException {
try {
return getSynchronizer().getSyncInfo(getSyncName(), resource);
@@ -160,7 +160,7 @@ public class PersistantResourceVariantByteStore extends ResourceVariantByteStore
throw TeamException.asTeamException(e);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.variants.ResourceVariantByteStore#run(org.eclipse.core.resources.IWorkspaceRunnable, org.eclipse.core.runtime.IProgressMonitor)
*/
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
index 49796a8bc..f94840b45 100644
--- 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -23,12 +23,12 @@ import org.eclipse.team.core.TeamException;
* 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 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
+ * by using the local handle that corresponds to the resource variant
* (using the <code>members</code> method).
- *
+ *
* @since 3.0
*/
public abstract class ResourceVariantByteStore {
@@ -37,7 +37,7 @@ 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
@@ -49,12 +49,12 @@ public abstract class ResourceVariantByteStore {
* @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,
+ * 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
@@ -62,11 +62,11 @@ public abstract class ResourceVariantByteStore {
* @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
+ * 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
+ * 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>,
@@ -75,9 +75,9 @@ public abstract class ResourceVariantByteStore {
* @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
+ * 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.
@@ -85,14 +85,14 @@ public abstract class ResourceVariantByteStore {
* @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>
@@ -121,7 +121,7 @@ public abstract class ResourceVariantByteStore {
* @param runnable the action to perform
* @param monitor a progress monitor.
* @exception TeamException if the operation failed.
- * @exception OperationCanceledException if the operation is canceled.
+ * @exception OperationCanceledException if the operation is canceled.
*/
public void run(IResource root, IWorkspaceRunnable runnable, IProgressMonitor monitor) throws TeamException {
try {
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
index 82389438b..12cf6faeb 100644
--- 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
@@ -19,14 +19,14 @@ 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;
/**
@@ -37,28 +37,28 @@ public abstract class ResourceVariantTree extends AbstractResourceVariantTree {
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)
*/
@@ -73,22 +73,22 @@ public abstract class ResourceVariantTree extends AbstractResourceVariantTree {
}
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>
+ * 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
@@ -99,7 +99,7 @@ public abstract class ResourceVariantTree extends AbstractResourceVariantTree {
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)
*/
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
index 91220d35c..7c7c64e35 100644
--- 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
@@ -26,7 +26,7 @@ import org.eclipse.team.internal.core.*;
* 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 {
@@ -67,7 +67,7 @@ public abstract class ResourceVariantTreeSubscriber extends Subscriber {
public IResource[] members(IResource resource) throws TeamException {
if(resource.getType() == IResource.FILE) {
return new IResource[0];
- }
+ }
try {
Set allMembers = new HashSet();
try {
@@ -121,7 +121,7 @@ public abstract class ResourceVariantTreeSubscriber extends Subscriber {
}
} finally {
monitor.done();
- }
+ }
if (!errors.isEmpty()) {
int numSuccess = resources.length - errors.size() - cancels.size();
if (!cancels.isEmpty()) {
@@ -141,16 +141,16 @@ public abstract class ResourceVariantTreeSubscriber extends Subscriber {
}
});
}
- 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));
+ 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));
}
if (!cancels.isEmpty()) {
throw new OperationCanceledException(
((IStatus) cancels.get(0)).getMessage());
}
}
-
+
/**
* Return the base resource variant tree.
*/
@@ -160,7 +160,7 @@ public abstract class ResourceVariantTreeSubscriber extends Subscriber {
* Return the remote resource variant tree.
*/
protected abstract IResourceVariantTree getRemoteTree();
-
+
private IStatus refresh(IResource resource, int depth, IProgressMonitor monitor) {
monitor = Policy.monitorFor(monitor);
try {
@@ -176,7 +176,7 @@ public abstract class ResourceVariantTreeSubscriber extends Subscriber {
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);
+ return new TeamStatus(IStatus.ERROR, TeamPlugin.ID, 0, NLS.bind(Messages.ResourceVariantTreeSubscriber_2, new String[] { resource.getFullPath().toString(), e.getMessage() }), e, resource);
} catch (OperationCanceledException e) {
return new TeamStatus(IStatus.CANCEL, TeamPlugin.ID, 0, NLS.bind(
Messages.ResourceVariantTreeSubscriber_4,
@@ -184,9 +184,9 @@ public abstract class ResourceVariantTreeSubscriber extends Subscriber {
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;
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
index 48d32f574..ddc2bae32 100644
--- 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
@@ -20,7 +20,7 @@ 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.
- *
+ *
* @since 3.0
* @noextend This class is not intended to be subclassed by clients.
*/
@@ -28,7 +28,7 @@ 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)
@@ -37,7 +37,7 @@ public class SessionResourceVariantByteStore extends ResourceVariantByteStore {
public boolean deleteBytes(IResource resource) throws TeamException {
return flushBytes(resource, IResource.DEPTH_ZERO);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.variants.ResourceVariantByteStore#dispose()
*/
@@ -106,11 +106,11 @@ public class SessionResourceVariantByteStore extends ResourceVariantByteStore {
internalSetSyncInfo(resource, bytes);
return true;
}
-
+
private Map getSyncBytesCache() {
return syncBytesCache;
}
-
+
private void internalAddToParent(IResource resource) {
IContainer parent = resource.getParent();
if (parent == null) return;
@@ -121,7 +121,7 @@ public class SessionResourceVariantByteStore extends ResourceVariantByteStore {
}
members.add(resource);
}
-
+
private byte[] internalGetSyncBytes(IResource resource) {
return (byte[])getSyncBytesCache().get(resource);
}
@@ -136,7 +136,7 @@ public class SessionResourceVariantByteStore extends ResourceVariantByteStore {
}
}
}
-
+
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
index 1a9992001..87279ebc9 100644
--- 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
@@ -20,9 +20,9 @@ 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 {
@@ -30,7 +30,7 @@ public abstract class ThreeWayRemoteTree extends ResourceVariantTree {
private ThreeWaySubscriber subscriber;
/*
- * A resource variant byte store that accesses the remote bytes
+ * A resource variant byte store that accesses the remote bytes
* from a three-way synchronizer. Both access and modification
* are supported.
*/
@@ -66,7 +66,7 @@ public abstract class ThreeWayRemoteTree extends ResourceVariantTree {
return synchronizer;
}
}
-
+
/**
* Create a remote resource variant tree that stores and obtains
* it's bytes from the remote slot of the synchronizer of the
@@ -77,14 +77,14 @@ public abstract class ThreeWayRemoteTree extends ResourceVariantTree {
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)
*/
@@ -99,7 +99,7 @@ public abstract class ThreeWayRemoteTree extends ResourceVariantTree {
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)
*/
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
index 3324fabeb..0382fcfea 100644
--- 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
@@ -20,13 +20,13 @@ import org.eclipse.team.internal.core.TeamPlugin;
* 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.
@@ -35,7 +35,7 @@ public class ThreeWayResourceComparator implements IResourceVariantComparator {
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)
*/
@@ -67,22 +67,22 @@ public class ThreeWayResourceComparator implements IResourceVariantComparator {
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++) {
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
index 0058eced7..87d200e39 100644
--- 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
@@ -26,20 +26,20 @@ import org.eclipse.team.internal.core.subscribers.ThreeWayBaseTree;
* 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
@@ -51,14 +51,14 @@ public abstract class ThreeWaySubscriber extends ResourceVariantTreeSubscriber i
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()
*/
@@ -78,14 +78,14 @@ public abstract class ThreeWaySubscriber extends ResourceVariantTreeSubscriber i
}
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
@@ -99,7 +99,7 @@ public abstract class ThreeWaySubscriber extends ResourceVariantTreeSubscriber i
if (Team.isIgnoredHint(resource)) return false;
return true;
}
-
+
/**
* Return the three-way synchronizer of this subscriber.
* @return the three-way synchronizer of this subscriber.
@@ -107,9 +107,9 @@ public abstract class ThreeWaySubscriber extends ResourceVariantTreeSubscriber i
public ThreeWaySynchronizer getSynchronizer() {
return synchronizer;
}
-
+
/**
- * Create the resource variant for the given local resource from the
+ * 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
@@ -118,7 +118,7 @@ public abstract class ThreeWaySubscriber extends ResourceVariantTreeSubscriber i
* @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
@@ -127,7 +127,7 @@ public abstract class ThreeWaySubscriber extends ResourceVariantTreeSubscriber i
* @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
@@ -144,7 +144,7 @@ public abstract class ThreeWaySubscriber extends ResourceVariantTreeSubscriber i
rootRemoved(resource);
}
}
-
+
private void rootAdded(IResource resource) {
SubscriberChangeEvent delta = new SubscriberChangeEvent(this, ISubscriberChangeEvent.ROOT_ADDED, resource);
fireTeamResourceChange(new SubscriberChangeEvent[] { delta });
@@ -159,7 +159,7 @@ public abstract class ThreeWaySubscriber extends ResourceVariantTreeSubscriber i
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();
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
index 8d1cf448f..8bf860306 100644
--- 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
@@ -23,7 +23,7 @@ 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
+ * 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)
@@ -31,16 +31,16 @@ import org.eclipse.team.internal.core.subscribers.BatchingLock.ThreadInfo;
* <li>Change events and event batching (run)
* <li>Thread-safety
* </ul>
- *
+ *
* @since 3.0
*/
public class ThreeWaySynchronizer {
-
+
private IFlushOperation flushOperation = new IFlushOperation() {
/**
* Callback which is invoked when the batching resource lock is released
* or when a flush is requested (see beginBatching(IResource)).
- *
+ *
* @see BatchingLock#flush(IProgressMonitor)
*/
public void flush(ThreadInfo info, IProgressMonitor monitor)
@@ -52,22 +52,22 @@ public class ThreeWaySynchronizer {
};
private static final byte[] IGNORED_BYTES = "i".getBytes(); //$NON-NLS-1$
-
+
private ILock lock = Job.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
+ * 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.
@@ -80,14 +80,14 @@ public class ThreeWaySynchronizer {
/**
* 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
+ * 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
+ * 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) {
@@ -99,21 +99,21 @@ public class ThreeWaySynchronizer {
/**
* Removes a listener previously registered with this synchronizer.
* Has no effect 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
+ * 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
+ * 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
@@ -133,13 +133,13 @@ public class ThreeWaySynchronizer {
/**
* 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
+ * 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
+ * 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
@@ -183,13 +183,13 @@ public class ThreeWaySynchronizer {
(getLocalTimestamp(resource) != resource.getModificationStamp()) ||
(getBaseBytes(resource) != null && !resource.exists()));
}
-
+
/**
- * Return the remote bytes that are cached for the given resource
+ * 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
+ * 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
@@ -206,15 +206,15 @@ public class ThreeWaySynchronizer {
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
+ * 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>
+ * 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
@@ -273,7 +273,7 @@ public class ThreeWaySynchronizer {
batchingLock.resourceChanged(resource);
return true;
}
- return false;
+ return false;
} finally {
endOperation();
}
@@ -281,17 +281,17 @@ public class ThreeWaySynchronizer {
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.
- * @throws TeamException
+ * @throws TeamException
*/
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>.
@@ -303,7 +303,7 @@ public class ThreeWaySynchronizer {
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,
@@ -317,7 +317,7 @@ public class ThreeWaySynchronizer {
}
/**
- * Return the members of the local resource that either have sync 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
@@ -363,7 +363,7 @@ public class ThreeWaySynchronizer {
beginOperation();
if (cache.flushBytes(resource, depth)) {
batchingLock.resourceChanged(resource);
- }
+ }
} finally {
endOperation();
}
@@ -414,7 +414,7 @@ public class ThreeWaySynchronizer {
});
}
}
-
+
/*
* Return the cached sync bytes for the given resource.
* The value <code>null</code> is returned if there is no
@@ -425,26 +425,26 @@ public class ThreeWaySynchronizer {
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();
@@ -457,7 +457,7 @@ public class ThreeWaySynchronizer {
endOperation();
}
}
-
+
private boolean equals(byte[] syncBytes, byte[] oldBytes) {
if (syncBytes.length != oldBytes.length) return false;
for (int i = 0; i < oldBytes.length; i++) {
@@ -465,20 +465,20 @@ public class ThreeWaySynchronizer {
}
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
+ // 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
*/
@@ -487,9 +487,9 @@ public class ThreeWaySynchronizer {
if (ResourcesPlugin.getWorkspace().isTreeLocked()) return;
lock.release();
}
-
+
/*
- * Begins a batch of operations in order to batch event changes.
+ * 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.
@@ -497,7 +497,7 @@ public class ThreeWaySynchronizer {
private ISchedulingRule beginBatching(ISchedulingRule resourceRule, IProgressMonitor monitor) {
return batchingLock.acquire(resourceRule, flushOperation /* IFlushOperation */, monitor);
}
-
+
/*
* Ends a batch of operations. The provided rule must be the one that was returned
* by the corresponding call to beginBatching.
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
index 50e34eed4..82b522361 100644
--- 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
@@ -20,8 +20,8 @@ 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.
+ * 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
@@ -29,67 +29,67 @@ import org.eclipse.team.core.TeamException;
* 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>
+ * <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
+ * <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>
+ * 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>
+ * 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.
*/
@@ -114,7 +114,7 @@ public abstract class BackgroundEventHandler {
return String.valueOf(type);
}
}
-
+
/**
* Resource event class. The type is specific to subclasses.
*/
@@ -155,13 +155,13 @@ public abstract class BackgroundEventHandler {
}
}
}
-
+
/**
* 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
+ * being processed. The current event will continue processing once the
* high priority event has been processed
*/
public static class RunnableEvent extends Event {
@@ -179,7 +179,7 @@ public abstract class BackgroundEventHandler {
return preemtive;
}
}
-
+
protected BackgroundEventHandler(String jobName, String errorTitle) {
this.jobName = jobName;
errors =
@@ -192,13 +192,13 @@ public abstract class BackgroundEventHandler {
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()) {
+ eventHandlerJob = new Job(getName()) {
public IStatus run(IProgressMonitor monitor) {
return processEvents(monitor);
}
@@ -220,7 +220,7 @@ public abstract class BackgroundEventHandler {
eventHandlerJob.setSystem(true);
eventHandlerJob.setPriority(Job.SHORT);
}
-
+
/**
* Return whether this background handler belongs to the given job family.
* @param family the job family
@@ -257,14 +257,14 @@ public abstract class BackgroundEventHandler {
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.
@@ -273,7 +273,7 @@ public abstract class BackgroundEventHandler {
shutdown = true;
eventHandlerJob.cancel();
}
-
+
/**
* Returns whether the handle has been shutdown.
* @return Returns whether the handle has been shutdown.
@@ -281,9 +281,9 @@ public abstract class BackgroundEventHandler {
public boolean isShutdown() {
return shutdown;
}
-
+
/**
- * Queue the event and start the job if it's not already doing work. If the job is
+ * 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
*/
@@ -304,7 +304,7 @@ public abstract class BackgroundEventHandler {
}
}
}
-
+
/**
* Return the name that is to be associated with the background job.
* @return the job name
@@ -314,7 +314,7 @@ public abstract class BackgroundEventHandler {
}
/*
- * Return the next event that has been queued, removing it from the queue.
+ * Return the next event that has been queued, removing it from the queue.
* @return the next event in the queue
*/
protected synchronized Event nextElement() {
@@ -323,14 +323,14 @@ public abstract class BackgroundEventHandler {
}
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
@@ -338,7 +338,7 @@ public abstract class BackgroundEventHandler {
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,
@@ -364,7 +364,7 @@ public abstract class BackgroundEventHandler {
Event event;
timeOfLastDispatch = System.currentTimeMillis();
dispatchCount = 1;
- while ((event = nextElement()) != null && ! isShutdown()) {
+ while ((event = nextElement()) != null && ! isShutdown()) {
try {
processEvent(event, subMonitor);
if (Policy.DEBUG_BACKGROUND_EVENTS) {
@@ -399,7 +399,7 @@ public abstract class BackgroundEventHandler {
}
/**
- * Notify clients of processed events. Return <code>true</code> if there
+ * 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.
@@ -410,10 +410,10 @@ public abstract class BackgroundEventHandler {
/**
* 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
+ * 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.
+ * queued.
* @return <code>true</code> if processed events should be dispatched and
* <code>false</code> otherwise
*/
@@ -421,7 +421,7 @@ public abstract class BackgroundEventHandler {
// 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) {
@@ -437,7 +437,7 @@ public abstract class BackgroundEventHandler {
}
return isQueueEmpty() || isDispatchDelayExceeded();
}
-
+
private boolean isDispatchDelayExceeded() {
long duration = System.currentTimeMillis() - timeOfLastDispatch;
return ((dispatchCount < DISPATCH_THRESHOLD && duration >= getShortDispatchDelay()) ||
@@ -462,7 +462,7 @@ public abstract class BackgroundEventHandler {
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
@@ -480,27 +480,27 @@ public abstract class BackgroundEventHandler {
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
+ * (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
+ * 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 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
index cf8d77520..e578f4cf6 100644
--- 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
@@ -21,7 +21,7 @@ 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
*/
@@ -29,7 +29,7 @@ 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)
*/
@@ -55,7 +55,7 @@ public class Cache implements ICache {
if (properties.isEmpty()) {
properties = null;
}
-
+
}
/* (non-Javadoc)
@@ -65,7 +65,7 @@ public class Cache implements ICache {
if (listeners == null)
listeners = new ListenerList(ListenerList.IDENTITY);
listeners.add(listener);
-
+
}
/* (non-Javadoc)
@@ -74,7 +74,7 @@ public class Cache implements ICache {
public synchronized void removeDisposeListener(ICacheListener listener) {
removeCacheListener(listener);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.ICache#removeCacheListener(org.eclipse.team.core.ICacheListener)
*/
@@ -97,12 +97,12 @@ public class Cache implements ICache {
}
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
index af166a26d..7ea9179b7 100644
--- 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
@@ -22,7 +22,7 @@ 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
@@ -31,41 +31,41 @@ public class DefaultFileModificationValidator extends FileModificationValidator
private FileModificationValidator uiValidator;
protected IStatus getDefaultStatus(IFile file) {
- return
+ 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)
+ ? 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)
+ 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);
+ 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]);
+ stati[i] = getDefaultStatus(files[i]);
if(! stati[i].isOK())
allOK = false;
}
-
+
return new MultiStatus(TeamPlugin.ID,
0, stati,
allOK
@@ -89,7 +89,7 @@ public class DefaultFileModificationValidator extends FileModificationValidator
if (!file.isReadOnly())
return Status.OK_STATUS;
synchronized (this) {
- if (uiValidator == null)
+ if (uiValidator == null)
uiValidator = loadUIValidator();
}
if (uiValidator != null) {
@@ -97,7 +97,7 @@ public class DefaultFileModificationValidator extends FileModificationValidator
}
return getDefaultStatus(file);
}
-
+
private FileModificationValidator loadUIValidator() {
IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(TeamPlugin.ID, TeamPlugin.DEFAULT_FILE_MODIFICATION_VALIDATOR_EXTENSION);
if (extension != 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
index 8878a6fc2..033ba299d 100644
--- 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
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.team.internal.core;
-
+
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
@@ -21,7 +21,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
/**
* Internal class which provides the default behavior for resource deletions and moves.
- *
+ *
*/
public class DefaultMoveDeleteHook implements IMoveDeleteHook {
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
index 30bcd518e..ff9105342 100644
--- 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
@@ -14,9 +14,9 @@ package org.eclipse.team.internal.core;
import org.eclipse.team.core.ProjectSetCapability;
/**
- * An internal class for backward compatibility with the
+ * 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
index 4e0c873d8..08040ed13 100644
--- 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
@@ -17,11 +17,11 @@ 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
+ *
+ * @since 3.0
*/
public class ExceptionCollector {
@@ -30,11 +30,11 @@ public class ExceptionCollector {
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>,
@@ -61,7 +61,7 @@ public class ExceptionCollector {
* 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.
+ * the collector is empty.
*/
public IStatus getStatus() {
if(statuses.isEmpty()) {
@@ -73,15 +73,15 @@ public class ExceptionCollector {
IStatus status = (IStatus) it.next();
multiStatus.merge(status);
}
- return multiStatus;
+ 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) {
@@ -102,6 +102,6 @@ public class ExceptionCollector {
}
private void recordStatus(IStatus status) {
- statuses.add(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
index 35670f498..32103b084 100644
--- 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
@@ -24,15 +24,15 @@ 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;
@@ -46,13 +46,13 @@ public class FileContentManager implements IFileContentManager {
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)) {
@@ -60,25 +60,25 @@ public class FileContentManager implements IFileContentManager {
}
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.
- *
+ *
+ * @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())
+
+ if (!f.exists())
return false;
-
+
try {
DataInputStream input = new DataInputStream(new FileInputStream(f));
try {
@@ -93,10 +93,10 @@ public class FileContentManager implements IFileContentManager {
}
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
*/
@@ -118,46 +118,46 @@ public class FileContentManager implements IFileContentManager {
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);
}
@@ -168,15 +168,15 @@ public class FileContentManager implements IFileContentManager {
public int getType(IStorage storage) {
int type;
-
+
final String name= storage.getName();
- if (name != null && (type= getTypeForName(name)) != Team.UNKNOWN)
+ 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();
@@ -193,7 +193,7 @@ public class FileContentManager implements IFileContentManager {
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());
@@ -212,9 +212,9 @@ public class FileContentManager implements IFileContentManager {
return fUserNameMappings.referenceMap().containsKey(filename);
// || fPluginNameMappings.referenceMap().containsKey(filename);
}
-
+
private static String getFileExtension(String name) {
- if (name == null)
+ if (name == null)
return null;
int index = name.lastIndexOf('.');
if (index == -1)
@@ -233,7 +233,7 @@ public class FileContentManager implements IFileContentManager {
}
return result;
}
-
+
private IStringMapping [] getMappings(UserStringMappings userMappings, PluginStringMappings pluginMappings) {
final Map mappings= new HashMap();
if (pluginMappings != null)
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
index 2821d48cd..07a511564 100644
--- 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
@@ -22,7 +22,7 @@ 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.
@@ -31,26 +31,26 @@ public class FileModificationValidatorManager extends FileModificationValidator
*/
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();
@@ -63,20 +63,20 @@ public class FileModificationValidatorManager extends FileModificationValidator
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,
+ 0,
(IStatus[])returnStati.toArray(new IStatus[returnStati.size()]),
allOK
? Messages.ok
@@ -99,7 +99,7 @@ public class FileModificationValidatorManager extends FileModificationValidator
return validator.validateSave(file);
}
-
+
private synchronized FileModificationValidator getDefaultValidator() {
if (defaultValidator == null) {
defaultValidator = new DefaultFileModificationValidator();
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
index cac0c4f78..60347be34 100644
--- 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
@@ -10,20 +10,20 @@
*******************************************************************************/
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 {
@@ -32,7 +32,7 @@ public class InfiniteSubProgressMonitor extends SubProgressMonitor {
int currentIncrement;
int nextProgress;
int worked;
-
+
/**
* Constructor for InfiniteSubProgressMonitor.
* @param monitor
@@ -51,7 +51,7 @@ public class InfiniteSubProgressMonitor extends SubProgressMonitor {
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;
@@ -60,7 +60,7 @@ public class InfiniteSubProgressMonitor extends SubProgressMonitor {
this.nextProgress = currentIncrement;
this.worked = 0;
}
-
+
public void worked(int work) {
if (worked >= totalWork) return;
if (--nextProgress <= 0) {
@@ -70,17 +70,17 @@ public class InfiniteSubProgressMonitor extends SubProgressMonitor {
// we have passed the current halfway point, so double the
// increment and reset the halfway point.
currentIncrement *= 2;
- halfWay += (totalWork - halfWay) / 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) {
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
index 454300fde..94ce9b34b 100644
--- 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
@@ -25,7 +25,7 @@ public class Messages extends NLS {
public static String concatStrings;
public static String AbstractResourceVariantTree_0;
-
+
public static String Assert_assertionFailed;
public static String FileModificationValidator_someReadOnly;
@@ -95,7 +95,7 @@ public class Messages extends NLS {
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;
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
index 3874a958d..f4e0bd23f 100644
--- 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
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.team.internal.core;
-
+
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
@@ -24,12 +24,12 @@ 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;
+ return DEFAULT_HOOK;
}
IMoveDeleteHook hook = provider.getMoveDeleteHook();
if (hook == null) {
@@ -37,7 +37,7 @@ public class MoveDeleteManager implements IMoveDeleteHook {
}
return hook;
}
-
+
/*
* @see IMoveDeleteHook#deleteFile(IResourceTree, IFile, int, IProgressMonitor)
*/
@@ -46,7 +46,7 @@ public class MoveDeleteManager implements IMoveDeleteHook {
IFile file,
int updateFlags,
IProgressMonitor monitor) {
-
+
return getHookFor(file).deleteFile(tree, file, updateFlags, monitor);
}
@@ -58,7 +58,7 @@ public class MoveDeleteManager implements IMoveDeleteHook {
IFolder folder,
int updateFlags,
IProgressMonitor monitor) {
-
+
return getHookFor(folder).deleteFolder(tree, folder, updateFlags, monitor);
}
@@ -70,7 +70,7 @@ public class MoveDeleteManager implements IMoveDeleteHook {
IProject project,
int updateFlags,
IProgressMonitor monitor) {
-
+
return getHookFor(project).deleteProject(tree, project, updateFlags, monitor);
}
@@ -83,7 +83,7 @@ public class MoveDeleteManager implements IMoveDeleteHook {
IFile destination,
int updateFlags,
IProgressMonitor monitor) {
-
+
return getHookFor(source).moveFile(tree, source, destination, updateFlags, monitor);
}
@@ -96,7 +96,7 @@ public class MoveDeleteManager implements IMoveDeleteHook {
IFolder destination,
int updateFlags,
IProgressMonitor monitor) {
-
+
return getHookFor(source).moveFolder(tree, source, destination, updateFlags, monitor);
}
@@ -109,7 +109,7 @@ public class MoveDeleteManager implements IMoveDeleteHook {
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
index 6e039f225..882620548 100644
--- 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
@@ -17,7 +17,7 @@ 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
+ * This implementation supports cancelation. The default implementations of the
* other methods do nothing.
* </p>
* @see SubProgressMonitor
@@ -30,7 +30,7 @@ public class NullSubProgressMonitor extends SubProgressMonitor {
public NullSubProgressMonitor(IProgressMonitor monitor) {
super(monitor, 0, 0);
}
-
+
/**
* @see IProgressMonitor#beginTask(String, int)
*/
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
index acaad2b02..68bf8e7f8 100644
--- 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
@@ -20,9 +20,9 @@ import org.eclipse.core.runtime.jobs.ISchedulingRule;
* 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)
*/
@@ -65,7 +65,7 @@ public class PessimisticResourceRuleFactory extends ResourceRuleFactory {
public ISchedulingRule validateEditRule(IResource[] resources) {
return root;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.core.resources.team.ResourceRuleFactory#charsetRule(org.eclipse.core.resources.IResource)
*/
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
index c9e6c69b8..ef9277282 100644
--- 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
@@ -17,48 +17,48 @@ 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 ext = configElements[j].getAttribute(fAttributeName);//"extension");
final String type = configElements[j].getAttribute("type"); //$NON-NLS-1$
- if (ext == null || type == null)
+ 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$
@@ -68,7 +68,7 @@ public class PluginStringMappings {
}
return result;
}
-
+
public Map referenceMap() {
if (fMappings == null) {
fMappings= loadPluginPatterns();
@@ -79,5 +79,5 @@ public class PluginStringMappings {
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
index d758e0f95..aad349319 100644
--- 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -35,7 +35,7 @@ public class Policy {
/**
* Progress monitor helpers.
- *
+ *
* @param monitor the progress monitor
*/
public static void checkCanceled(IProgressMonitor monitor) {
@@ -47,7 +47,7 @@ public class Policy {
return new NullProgressMonitor();
return monitor;
}
-
+
public static IProgressMonitor subMonitorFor(IProgressMonitor monitor, int ticks) {
if (monitor == null)
return new NullProgressMonitor();
@@ -55,7 +55,7 @@ public class Policy {
return monitor;
return new SubProgressMonitor(monitor, ticks);
}
-
+
public static IProgressMonitor infiniteSubMonitorFor(IProgressMonitor monitor, int ticks) {
if (monitor == null)
return new NullProgressMonitor();
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
index 3deaa1a65..05cc63aed 100644
--- 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
@@ -18,7 +18,7 @@ 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();
@@ -47,14 +47,14 @@ public class RepositoryProviderManager implements IRepositoryProviderListener {
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
index 860fa0229..5a3827a36 100644
--- 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
@@ -24,27 +24,27 @@ 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();
-
+ 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) {
@@ -53,22 +53,22 @@ public class ResourceVariantCache {
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) {
@@ -80,7 +80,7 @@ public class ResourceVariantCache {
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
@@ -89,7 +89,7 @@ public class ResourceVariantCache {
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++) {
@@ -97,11 +97,11 @@ public class ResourceVariantCache {
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
@@ -118,7 +118,7 @@ public class ResourceVariantCache {
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;
@@ -135,7 +135,7 @@ public class ResourceVariantCache {
entry.dispose();
}
}
-
+
private synchronized void purgeFromCache(String id) {
ResourceVariantCacheEntry entry = (ResourceVariantCacheEntry)cacheEntries.get(id);
File f = entry.getFile();
@@ -147,7 +147,7 @@ public class ResourceVariantCache {
}
cacheEntries.remove(id);
}
-
+
private synchronized void createCacheDirectory() {
IPath cacheLocation = getCachePath();
File file = cacheLocation.toFile();
@@ -162,13 +162,13 @@ public class ResourceVariantCache {
}
}
if (! file.exists() && ! file.mkdirs()) {
- TeamPlugin.log(new TeamException(NLS.bind(Messages.RemoteContentsCache_fileError, new String[] { file.getAbsolutePath() })));
+ 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;
@@ -184,7 +184,7 @@ public class ResourceVariantCache {
}
}
}
-
+
private void deleteFile(File file) throws TeamException {
if (file.isDirectory()) {
File[] children = file.listFiles();
@@ -193,7 +193,7 @@ public class ResourceVariantCache {
}
}
if (! file.delete()) {
- throw new TeamException(NLS.bind(Messages.RemoteContentsCache_fileError, new String[] { file.getAbsolutePath() }));
+ throw new TeamException(NLS.bind(Messages.RemoteContentsCache_fileError, new String[] { file.getAbsolutePath() }));
}
}
@@ -209,7 +209,7 @@ public class ResourceVariantCache {
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 }));
+ throw new IllegalStateException(NLS.bind(Messages.RemoteContentsCache_cacheDisposed, new String[] { name }));
}
ResourceVariantCacheEntry entry = (ResourceVariantCacheEntry)cacheEntries.get(id);
if (entry != null) {
@@ -217,7 +217,7 @@ public class ResourceVariantCache {
}
return entry;
}
-
+
/**
* @param id the id that uniquely identifies the remote resource that is cached.
* @return the cache entry
@@ -225,7 +225,7 @@ public class ResourceVariantCache {
public ResourceVariantCacheEntry getCacheEntry(String id) {
return internalGetCacheEntry(id);
}
-
+
public synchronized ResourceVariantCacheEntry add(String id, CachedResourceVariant resource) {
clearOldCacheEntries();
String filePath = String.valueOf(cacheDirSize++);
@@ -238,7 +238,7 @@ public class ResourceVariantCache {
public String getName() {
return name;
}
-
+
/*
* Method used for testing only
*/
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
index d549dc1c9..d7782e42a 100644
--- 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
@@ -23,11 +23,11 @@ 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;
@@ -64,7 +64,7 @@ public class ResourceVariantCacheEntry {
}
} 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);
+ 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]);
@@ -91,7 +91,7 @@ public class ResourceVariantCacheEntry {
endOperation();
}
}
-
+
private void endOperation() {
lock.release();
}
@@ -103,13 +103,13 @@ public class ResourceVariantCacheEntry {
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 }));
+ 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 {
@@ -121,9 +121,9 @@ public class ResourceVariantCacheEntry {
out = new ByteArrayOutputStream();
}
} catch (FileNotFoundException e) {
- throw new TeamException(NLS.bind(Messages.RemoteContentsCache_fileError, new String[] { ioFile.getAbsolutePath() }), e);
+ throw new TeamException(NLS.bind(Messages.RemoteContentsCache_fileError, new String[] { ioFile.getAbsolutePath() }), e);
}
-
+
// Transfer the contents
try {
try {
@@ -141,11 +141,11 @@ public class ResourceVariantCacheEntry {
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);
+ throw new TeamException(NLS.bind(Messages.RemoteContentsCache_fileError, new String[] { ioFile.getAbsolutePath() }), e);
} finally {
try {
stream.close();
@@ -162,7 +162,7 @@ public class ResourceVariantCacheEntry {
public int getState() {
return state;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.sync.ICacheEntry#getSize()
*/
@@ -202,15 +202,15 @@ public class ResourceVariantCacheEntry {
}
}
-
+
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
index 1ff351a0b..15e76350f 100644
--- 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
@@ -18,11 +18,11 @@ 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.
*/
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
index b3802d74a..00adffb41 100644
--- 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
@@ -19,7 +19,7 @@ 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$
@@ -27,16 +27,16 @@ public class StorageMergerRegistry {
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();
@@ -58,7 +58,7 @@ public class StorageMergerRegistry {
return descriptor.createStreamMerger();
return null;
}
-
+
/**
* Returns a stream merger for the given content type.
*
@@ -73,21 +73,21 @@ public class StorageMergerRegistry {
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++) {
@@ -98,13 +98,13 @@ public class StorageMergerRegistry {
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) {
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
index 644ca775f..7fd92a786 100644
--- 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
@@ -17,7 +17,7 @@ import java.util.Vector;
* A string pattern matcher. Supports '*' and '?' wildcards.
* Note: code copied from org.eclipse.jdt.internal.core.util.StringMatcher on April 3, 2001
* (version 0.1 - 010901H18 [rename jbl]). Sync'ed on November 4, 2009 (revision 1.17).
- *
+ *
*/
public class StringMatcher {
protected String fPattern;
@@ -31,10 +31,10 @@ public class StringMatcher {
/* boundary value beyond which we don't need to search in the text */
protected int fBound = 0;
private boolean fPathPattern;
-
+
protected static final char fSingleWildCard = '\u0000';
-
+
public static class Position {
int start; //inclusive
int end; //exclusive
@@ -51,14 +51,14 @@ public class StringMatcher {
}
/**
- * StringMatcher constructor takes in a String object that is a simple
+ * StringMatcher constructor takes in a String object that is a simple
* pattern. The pattern may contain '*' for 0 and many characters and
- * '?' for exactly one character.
+ * '?' for exactly one character.
*
- * Literal '*' and '?' characters must be escaped in the pattern
+ * Literal '*' and '?' characters must be escaped in the pattern
* e.g., "\*" means literal "*", etc.
*
- * Escaping any other character (including the escape character itself),
+ * Escaping any other character (including the escape character itself),
* just results in that character in the pattern.
* e.g., "\a" means "a" and "\\" means "\"
*
@@ -78,22 +78,22 @@ public class StringMatcher {
fPattern= pattern;
fLength = pattern.length();
fPathPattern = pattern.indexOf('/') != -1;
-
+
if (fIgnoreWildCards) {
parseNoWildCards();
} else {
parseWildCards();
}
}
-
+
/**
- * 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
+ * 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
+ * @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"
@@ -103,7 +103,7 @@ public class StringMatcher {
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;
@@ -123,10 +123,10 @@ public class StringMatcher {
int segCount = fSegments.length;
if (segCount == 0)//pattern contains only '*'(s)
return new Position (start, end);
-
+
int curPos = start;
- int matchStart = -1;
- int i;
+ int matchStart = -1;
+ int i;
for (i = 0; i < segCount && curPos < end; ++i) {
String current = fSegments[i];
int nextMatch = regExpPosIn(text, curPos, end, current);
@@ -151,11 +151,11 @@ public class StringMatcher {
}
/**
* Given the starting (inclusive) and the ending (exclusive) positions in the
- * <code>text</code>, determine if the given substring matches with aPattern
+ * <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 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
+ * @param end marks the ending index (exclusive) of the substring
*/
public boolean match(String text, int start, int end) {
if (null == text)
@@ -226,15 +226,15 @@ public class StringMatcher {
}
return i == segCount ;
}
-
+
/**
- * check existence of '/' in the pattern.
- * @return <b>true</b> if pattern contains '/'
+ * check existence of '/' in the pattern.
+ * @return <b>true</b> if pattern contains '/'
*/
public boolean isPathPattern() {
return fPathPattern;
}
-
+
/**
* 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.
@@ -301,43 +301,43 @@ public class StringMatcher {
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
+ * @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
+ * @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))
@@ -347,7 +347,7 @@ public class StringMatcher {
}
/**
- *
+ *
* @param text the text
* @param tStart the start
* @param p the pattern
@@ -381,30 +381,30 @@ public class StringMatcher {
}
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
+ * @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) {
-
+ 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
index 2e5e7687d..bb071633b 100644
--- 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
@@ -23,10 +23,10 @@ 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) {
@@ -35,7 +35,7 @@ public class TeamHookDispatcher extends TeamHook {
instance.setRuleFactory(project, factory);
}
}
-
+
public TeamHookDispatcher() {
instance = this;
}
@@ -51,7 +51,7 @@ public class TeamHookDispatcher extends TeamHook {
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)
*/
@@ -75,7 +75,7 @@ public class TeamHookDispatcher extends TeamHook {
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)
*/
@@ -87,7 +87,7 @@ public class TeamHookDispatcher extends TeamHook {
return provider.validateCreateLink(folder, updateFlags, location);
}
}
-
+
/**
* Method getProvider.
* @param folder
@@ -111,5 +111,5 @@ public class TeamHookDispatcher extends TeamHook {
// 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
index 03510f89e..8795d504c 100644
--- 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
@@ -26,13 +26,13 @@ import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
/**
- * <code>TeamPlugin</code> is the plug-in runtime class for the Team
+ * <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 {
@@ -42,10 +42,10 @@ final public class TeamPlugin extends Plugin {
// 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
@@ -56,26 +56,26 @@ final public class TeamPlugin extends Plugin {
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 =
+ public final static QualifiedName PROVIDER_PROP_KEY =
new QualifiedName("org.eclipse.team.core", "repository"); //$NON-NLS-1$ //$NON-NLS-2$
// The id for the Bundle Import extension point
public static final String EXTENSION_POINT_BUNDLE_IMPORTERS = ID + ".bundleImporters"; //$NON-NLS-1$
// The one and only plug-in instance
- private static TeamPlugin plugin;
+ private static TeamPlugin plugin;
private ServiceRegistration debugRegistration;
private IStreamMergerDelegate mergerDelegate;
- /**
+ /**
* Constructs a plug-in runtime class.
*/
public TeamPlugin() {
super();
plugin = this;
}
-
+
/**
* @see Plugin#start(BundleContext)
*/
@@ -89,7 +89,7 @@ final public class TeamPlugin extends Plugin {
Team.startup();
}
-
+
/**
* @see Plugin#stop(BundleContext)
*/
@@ -105,7 +105,7 @@ final public class TeamPlugin extends Plugin {
super.stop(context);
}
}
-
+
/**
* Returns the Team plug-in.
*
@@ -114,7 +114,7 @@ final public class TeamPlugin extends Plugin {
public static TeamPlugin getPlugin() {
return plugin;
}
-
+
/**
* Log the given exception allowing with the provided message and severity indicator
* @param severity the severity
@@ -124,7 +124,7 @@ final public class TeamPlugin extends Plugin {
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.
@@ -133,7 +133,7 @@ final public class TeamPlugin extends Plugin {
public static void log(CoreException e) {
log(e.getStatus().getSeverity(), e.getMessage(), e);
}
-
+
/*
* Static helper methods for creating exceptions
*/
@@ -141,7 +141,7 @@ final public class TeamPlugin extends Plugin {
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();
@@ -161,7 +161,7 @@ final public class TeamPlugin extends Plugin {
}
}
}
-
+
public static RepositoryProviderType getAliasType(String id) {
IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(TeamPlugin.ID, TeamPlugin.REPOSITORY_EXTENSION);
if (extension != null) {
@@ -178,10 +178,10 @@ final public class TeamPlugin extends Plugin {
}
}
}
- }
+ }
return null;
}
-
+
public static IPath[] getMetaFilePaths(String id) {
IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(TeamPlugin.ID, TeamPlugin.REPOSITORY_EXTENSION);
if (extension != null) {
@@ -193,11 +193,11 @@ final public class TeamPlugin extends Plugin {
String metaFilePaths = configElements[j].getAttribute("metaFilePaths"); //$NON-NLS-1$
if (extensionId != null && extensionId.equals(id) && metaFilePaths != null) {
return getPaths(metaFilePaths);
-
+
}
}
}
- }
+ }
return null;
}
@@ -211,7 +211,7 @@ final public class TeamPlugin extends Plugin {
}
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.
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
index 5f26323c6..f93a0163d 100644
--- 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -24,13 +24,13 @@ import org.eclipse.team.core.RepositoryProvider;
import org.eclipse.team.core.RepositoryProviderType;
/**
- * Change listener that detects and handles project moves and
+ * 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();
@@ -42,10 +42,10 @@ public final class TeamResourceChangeListener implements IResourceChangeListener
}
}
}
-
+
public void resourceChanged(IResourceChangeEvent event) {
IResourceDelta[] projectDeltas = event.getDelta().getAffectedChildren();
- for (int i = 0; i < projectDeltas.length; i++) {
+ for (int i = 0; i < projectDeltas.length; i++) {
IResourceDelta delta = projectDeltas[i];
IResource resource = delta.getResource();
IProject project = resource.getProject();
@@ -109,7 +109,7 @@ public final class TeamResourceChangeListener implements IResourceChangeListener
IResource resource = file;
if (foundPath != null) {
for (int i = 0; i < foundPath.segmentCount(); i++) {
- resource = resource.getParent();
+ resource = resource.getParent();
}
}
if (resource.getType() == IResource.FILE) {
@@ -148,7 +148,7 @@ public final class TeamResourceChangeListener implements IResourceChangeListener
try {
delta.accept(new IResourceDeltaVisitor() {
public boolean visit(IResourceDelta delta) throws CoreException {
- if ((delta.getKind() & IResourceDelta.ADDED) != 0
+ if ((delta.getKind() & IResourceDelta.ADDED) != 0
&& delta.getResource().getType() == IResource.FILE) {
result.add(delta.getResource());
}
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
index 9d6fa3fe5..8d312ba0e 100644
--- 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
@@ -20,36 +20,36 @@ 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;
@@ -59,13 +59,13 @@ public class UserStringMappings implements Preferences.IPropertyChangeListener {
}
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;
@@ -77,12 +77,12 @@ public class UserStringMappings implements Preferences.IPropertyChangeListener {
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);
@@ -93,13 +93,13 @@ public class UserStringMappings implements Preferences.IPropertyChangeListener {
}
TeamPlugin.getPlugin().getPluginPreferences().setValue(fKey, buffer.toString());
}
-
+
protected Map loadMappingsFromPreferences() {
final Map result= new HashMap();
-
- if (!fPreferences.contains(fKey))
+
+ if (!fPreferences.contains(fKey))
return result;
-
+
final String prefTypes = fPreferences.getString(fKey);
final StringTokenizer tok = new StringTokenizer(prefTypes, PREF_TEAM_SEPARATOR);
try {
@@ -107,7 +107,7 @@ public class UserStringMappings implements Preferences.IPropertyChangeListener {
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
index dc37a8364..be2f171a3 100644
--- 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
@@ -35,7 +35,7 @@ public class LocalFileHistory extends FileHistory {
this.file = file;
this.includeCurrent = includeCurrent;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.history.IFileHistory#getContributors(org.eclipse.team.core.history.IFileRevision)
*/
@@ -104,9 +104,9 @@ public class LocalFileHistory extends FileHistory {
/**
* Refreshes the revisions for this local file.
- *
+ *
* @param monitor a progress monitor
- * @throws TeamException
+ * @throws TeamException
*/
public void refresh(IProgressMonitor monitor) throws TeamException {
monitor.beginTask(Messages.LocalFileHistory_RefreshLocalHistory/*, file.getProjectRelativePath().toString())*/, 300);
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
index 3e5a8ffbf..4b6895b59 100644
--- 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
@@ -24,8 +24,8 @@ 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.
+ * 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 {
/*
@@ -37,7 +37,7 @@ public class LocalFileRevision extends FileRevision {
//Used for displaying the "real" current file
private IFile file;
- //Used for displaying which base revision
+ //Used for displaying which base revision
private IFileRevision baseRevision;
/*
@@ -52,8 +52,8 @@ public class LocalFileRevision extends FileRevision {
/*
* 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.
- *
+ * also pass in the base revision associated with this current version.
+ *
* @see #setBaseRevision(IFileRevision)
*/
public LocalFileRevision(IFile file) {
@@ -135,7 +135,7 @@ public class LocalFileRevision extends FileRevision {
if (file != null) {
return file.exists();
}
-
+
return state.exists();
}
@@ -146,12 +146,12 @@ public class LocalFileRevision extends FileRevision {
public void setBaseRevision(IFileRevision baseRevision) {
this.baseRevision = baseRevision;
}
-
+
public boolean isPropertyMissing() {
return true;
}
-
+
public IFileRevision withAllProperties(IProgressMonitor monitor) {
return this;
}
@@ -165,11 +165,11 @@ public class LocalFileRevision extends FileRevision {
long compareRevisionTime = revision.getTimestamp();
return (this.getTimestamp() > compareRevisionTime);
}
-
+
public URI getURI() {
if (file != null)
return file.getLocationURI();
-
+
return URIUtil.toURI(state.getFullPath());
}
@@ -180,11 +180,11 @@ public class LocalFileRevision extends FileRevision {
public IFileState getState() {
return state;
}
-
+
public boolean isCurrentState() {
return file != null;
}
-
+
public boolean equals(Object obj) {
if (obj == this)
return true;
@@ -201,7 +201,7 @@ public class LocalFileRevision extends FileRevision {
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();
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/importing/BundleImporterExtension.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/importing/BundleImporterExtension.java
index fba820315..4f133c782 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/importing/BundleImporterExtension.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/importing/BundleImporterExtension.java
@@ -21,7 +21,7 @@ import org.eclipse.team.internal.core.TeamPlugin;
/**
* A bundle importer extension.
- *
+ *
* @since 3.7
*/
public class BundleImporterExtension implements IBundleImporter {
@@ -31,7 +31,7 @@ public class BundleImporterExtension implements IBundleImporter {
/**
* Constructs a bundle importer extension on the given element.
- *
+ *
* @param element contribution
*/
public BundleImporterExtension(IConfigurationElement element) {
@@ -52,7 +52,7 @@ public class BundleImporterExtension implements IBundleImporter {
/**
* Returns underlying delegate.
- *
+ *
* @return delegate
* @exception CoreException if unable to instantiate delegate
*/
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
index a60b4f8ee..e660c9d1b 100644
--- 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
@@ -47,9 +47,9 @@ public abstract class AbstractResourceMappingScope extends AbstractSynchronizati
}
}
return (ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]);
-
+
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.mapping.ISynchronizationScope#getTraversals(java.lang.String)
*/
@@ -79,5 +79,5 @@ public abstract class AbstractResourceMappingScope extends AbstractSynchronizati
}
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
index 4fe1b8658..274a2cdb6 100644
--- 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
@@ -22,12 +22,12 @@ import org.eclipse.core.runtime.IPath;
* 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];
@@ -151,19 +151,19 @@ public class CompoundResourceTraversal {
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
+ // 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[]) compoundTraversal.deepFolders.toArray(new IResource[compoundTraversal.deepFolders.size()]),
IResource.DEPTH_INFINITE);
addResources(
- (IResource[]) compoundTraversal.shallowFolders.toArray(new IResource[compoundTraversal.shallowFolders.size()]),
+ (IResource[]) compoundTraversal.shallowFolders.toArray(new IResource[compoundTraversal.shallowFolders.size()]),
IResource.DEPTH_ONE);
addResources(
- (IResource[]) compoundTraversal.zeroFolders.toArray(new IResource[compoundTraversal.zeroFolders.size()]),
+ (IResource[]) compoundTraversal.zeroFolders.toArray(new IResource[compoundTraversal.zeroFolders.size()]),
IResource.DEPTH_ZERO);
addResources(
- (IResource[]) compoundTraversal.files.toArray(new IResource[compoundTraversal.files.size()]),
+ (IResource[]) compoundTraversal.files.toArray(new IResource[compoundTraversal.files.size()]),
IResource.DEPTH_ZERO);
}
@@ -172,7 +172,7 @@ public class CompoundResourceTraversal {
IResource resource = resources[i];
addResource(resource, depth);
}
-
+
}
/**
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
index c06aed66d..bd7fc2982 100644
--- 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
@@ -22,13 +22,13 @@ import org.eclipse.team.core.diff.*;
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();
@@ -68,7 +68,7 @@ public class DiffChangeEvent implements IDiffChangeEvent {
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
@@ -78,19 +78,19 @@ public class DiffChangeEvent implements IDiffChangeEvent {
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
+ // 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
@@ -103,11 +103,11 @@ public class DiffChangeEvent implements IDiffChangeEvent {
public void reset() {
reset = true;
}
-
+
public boolean isReset() {
return reset;
}
-
+
public boolean isEmpty() {
return changedResources.isEmpty() && removedResources.isEmpty() && addedResources.isEmpty();
}
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
index ca54ce46c..fd8344eab 100644
--- 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
@@ -25,7 +25,7 @@ public interface IStreamMergerDelegate {
* 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
*/
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/LineComparator.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/LineComparator.java
index f9e01603c..e601c04c4 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/LineComparator.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/LineComparator.java
@@ -124,7 +124,7 @@ class LineComparator implements IRangeComparator {
/*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.compare.rangedifferencer.IRangeComparator#getRangeCount()
*/
@@ -134,7 +134,7 @@ class LineComparator implements IRangeComparator {
/*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.compare.rangedifferencer.IRangeComparator#rangesEqual(int,
* org.eclipse.compare.rangedifferencer.IRangeComparator, int)
@@ -148,7 +148,7 @@ class LineComparator implements IRangeComparator {
/*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.compare.rangedifferencer.IRangeComparator#skipRangeComparison
* (int, int, org.eclipse.compare.rangedifferencer.IRangeComparator)
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
index caed24fa3..97b8f8f30 100644
--- 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.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.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
index 22d70f66b..8e697341b 100644
--- 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
@@ -23,11 +23,11 @@ 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()
*/
@@ -90,7 +90,7 @@ public class ModelProviderResourceMapping extends ResourceMapping {
}
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
index c87309ece..e3c6692a7 100644
--- 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
@@ -18,7 +18,7 @@ import org.eclipse.core.runtime.IPath;
* A tree of objects keyed by path
*/
public class PathTree {
-
+
class Node {
Object payload;
Set descendantsWithPayload;
@@ -41,7 +41,7 @@ public class PathTree {
public void setProperty(int propertyBit, boolean value) {
if (value)
flags |= propertyBit;
- else
+ else
flags ^= propertyBit;
}
public boolean descendantHasFlag(int property) {
@@ -57,7 +57,7 @@ public class PathTree {
return false;
}
}
-
+
private Map objects = new HashMap();
/**
@@ -72,7 +72,7 @@ public class PathTree {
return null;
return node.getPayload();
}
-
+
/**
* Put the object at the given path. Return the
* previous object at that path or <code>null</code>
@@ -93,7 +93,7 @@ public class PathTree {
}
return previous;
}
-
+
/**
* Remove the object at the given path and return
* the removed object or <code>null</code> if no
@@ -115,9 +115,9 @@ public class PathTree {
}
}
return previous;
-
+
}
-
+
/**
* Return whether the given path has children in the tree
* @param path
@@ -130,14 +130,14 @@ public class PathTree {
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
+ // 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);
@@ -161,7 +161,7 @@ public class PathTree {
}
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;
@@ -188,7 +188,7 @@ public class PathTree {
}
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;
@@ -271,22 +271,22 @@ public class PathTree {
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
@@ -301,7 +301,7 @@ public class PathTree {
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;
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
index 1691dd378..c01852b81 100644
--- 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
@@ -21,12 +21,12 @@ import org.eclipse.team.core.mapping.ISynchronizationScope;
public class ResourceMappingInputScope extends AbstractResourceMappingScope {
ISynchronizationScope wrappedScope;
-
+
public ResourceMappingInputScope(ISynchronizationScope wrappedScope) {
-
+
this.wrappedScope = wrappedScope;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.IResourceMappingScope#getInputMappings()
*/
@@ -82,14 +82,14 @@ public class ResourceMappingInputScope extends AbstractResourceMappingScope {
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()
*/
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
index c81cf57c3..6e832a4b5 100644
--- 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
@@ -21,26 +21,26 @@ import org.eclipse.team.core.mapping.provider.SynchronizationScopeManager;
/**
* Concrete implementation of the {@link ISynchronizationScope} interface for
* use by clients.
- *
+ *
* @see org.eclipse.core.resources.mapping.ResourceMapping
- *
+ *
* @since 3.2
* @noextend This class is not intended to be subclassed by clients.
*/
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.
@@ -54,7 +54,7 @@ public class ResourceMappingScope extends AbstractResourceMappingScope {
compoundTraversal.addTraversals(traversals);
return newTraversals;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.IResourceMappingOperationScope#getInputMappings()
*/
@@ -91,7 +91,7 @@ public class ResourceMappingScope extends AbstractResourceMappingScope {
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.
@@ -109,7 +109,7 @@ public class ResourceMappingScope extends AbstractResourceMappingScope {
public void setHasAdditionalResources(boolean hasAdditionalResources) {
this.hasAdditionalResources = hasAdditionalResources;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.mapping.IResourceMappingScope#hasAdditonalResources()
*/
@@ -120,7 +120,7 @@ public class ResourceMappingScope extends AbstractResourceMappingScope {
public CompoundResourceTraversal getCompoundTraversal() {
return compoundTraversal;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.mapping.IResourceMappingScope#asInputScope()
*/
@@ -150,7 +150,7 @@ public class ResourceMappingScope extends AbstractResourceMappingScope {
public void refresh(ResourceMapping[] mappings) {
manager.refresh(mappings);
}
-
+
public void reset() {
mappingsToTraversals.clear();
compoundTraversal.clear();
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
index a2879a8e1..b199f8704 100644
--- 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
@@ -59,7 +59,7 @@ public class ResourceVariantFileRevision extends FileRevision implements IAdapta
}
return null;
}
-
+
public boolean equals(Object obj) {
if (obj instanceof ResourceVariantFileRevision) {
ResourceVariantFileRevision fileRevision = (ResourceVariantFileRevision) obj;
@@ -67,7 +67,7 @@ public class ResourceVariantFileRevision extends FileRevision implements IAdapta
}
return false;
}
-
+
public int hashCode() {
return getVariant().hashCode();
}
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
index b67b60506..da7e30457 100644
--- 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
@@ -29,11 +29,11 @@ public class ScopeChangeEvent {
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);
@@ -55,7 +55,7 @@ public class ScopeChangeEvent {
public boolean isContracted() {
return contracted;
}
-
+
public ResourceMapping[] getChangedMappings() {
ResourceMapping[] currentMappings = scope.getMappings();
ResourceMapping[] changedMappings;
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
index 8f0980514..9b8f2a6f9 100644
--- 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
@@ -45,31 +45,31 @@ public class SyncInfoToDiffConverter {
}
private static SyncInfoToDiffConverter instance;
-
-
+
+
public static String diffKindToString(int kind) {
String label = ""; //$NON-NLS-1$
if(kind==IDiff.NO_CHANGE) {
- label = Messages.RemoteSyncElement_insync;
+ 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;
+ 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;
- }
+ 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);
@@ -78,7 +78,7 @@ public class SyncInfoToDiffConverter {
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;
@@ -109,7 +109,7 @@ public class SyncInfoToDiffConverter {
}
return diffFlags;
}
-
+
private static int asSyncInfoKind(IThreeWayDiff diff) {
int kind = diff.getKind();
if (diff.getKind() == IDiff.NO_CHANGE)
@@ -140,7 +140,7 @@ public class SyncInfoToDiffConverter {
}
return syncKind;
}
-
+
public IDiff getDeltaFor(SyncInfo info) {
if (info.getComparator().isThreeWay()) {
ITwoWayDiff local = getLocalDelta(info);
@@ -204,7 +204,7 @@ public class SyncInfoToDiffConverter {
private IFileRevision getFileRevisionFor(final IFile file) {
return new LocalFileRevision(file);
}
-
+
protected ResourceVariantFileRevision asFileRevision(final IResourceVariant variant) {
return new ResourceVariantFileRevision(variant);
}
@@ -229,7 +229,7 @@ public class SyncInfoToDiffConverter {
}
// For folders, we don't need file states
return new ResourceDiff(info.getLocal(), kind);
-
+
}
return null;
}
@@ -250,7 +250,7 @@ public class SyncInfoToDiffConverter {
return asResourceVariant(diff.getBeforeState());
return null;
}
-
+
public SyncInfo asSyncInfo(IDiff diff, IResourceVariantComparator comparator) {
if (diff instanceof ResourceDiff) {
ResourceDiff rd = (ResourceDiff) diff;
@@ -329,7 +329,7 @@ public class SyncInfoToDiffConverter {
}
return null;
}
-
+
public static IFileRevision getRemote(IThreeWayDiff twd) {
IResourceDiff rd = (IResourceDiff)twd.getRemoteChange();
if (rd != null)
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
index 497827025..78a41ce4a 100644
--- 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
@@ -17,7 +17,7 @@ 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.
@@ -25,7 +25,7 @@ import java.io.InterruptedIOException;
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
@@ -56,7 +56,7 @@ public class CRLFtoLFInputStream extends FilterInputStream {
pendingByte = false;
return lastByte;
}
-
+
/**
* Wraps the underlying stream's method.
* Translates CR/LF sequences to LFs transparently.
@@ -145,7 +145,7 @@ public class CRLFtoLFInputStream extends FilterInputStream {
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.
*/
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
index 7f987177e..c005ab6f1 100644
--- 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
@@ -17,14 +17,14 @@ 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
@@ -136,7 +136,7 @@ public class LFtoCRLFInputStream extends FilterInputStream {
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.
*/
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
index dcbd8ba85..b85f0e6bc 100644
--- 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
@@ -35,7 +35,7 @@ public class PollingInputStream extends FilterInputStream {
private int numAttempts;
private IProgressMonitor monitor;
private boolean cancellable;
-
+
/**
* Creates a new polling input stream.
* @param in the underlying input stream
@@ -49,7 +49,7 @@ public class PollingInputStream extends FilterInputStream {
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
@@ -77,7 +77,7 @@ public class PollingInputStream extends FilterInputStream {
} catch (InterruptedIOException e) {
if (checkCancellation()) throw new OperationCanceledException();
if (++attempts == numAttempts)
- throw new InterruptedIOException(Messages.PollingInputStream_closeTimeout);
+ throw new InterruptedIOException(Messages.PollingInputStream_closeTimeout);
if (Policy.DEBUG_STREAMS) System.out.println("close retry=" + attempts); //$NON-NLS-1$
} catch (IOException e) {
// ignore it - see https://bugs.eclipse.org/bugs/show_bug.cgi?id=203423#c10
@@ -85,7 +85,7 @@ public class PollingInputStream extends FilterInputStream {
}
}
}
-
+
/**
* Wraps the underlying stream's method.
* @return the next byte of data, or -1 if the end of the stream is reached.
@@ -102,12 +102,12 @@ public class PollingInputStream extends FilterInputStream {
return in.read();
} catch (InterruptedIOException e) {
if (++attempts == numAttempts)
- throw new InterruptedIOException(Messages.PollingInputStream_readTimeout);
+ throw new InterruptedIOException(Messages.PollingInputStream_readTimeout);
if (Policy.DEBUG_STREAMS) System.out.println("read retry=" + attempts); //$NON-NLS-1$
}
}
}
-
+
/**
* Wraps the underlying stream's method.
* @param buffer - the buffer into which the data is read.
@@ -128,12 +128,12 @@ public class PollingInputStream extends FilterInputStream {
} catch (InterruptedIOException e) {
if (e.bytesTransferred != 0) return e.bytesTransferred; // keep partial transfer
if (++attempts == numAttempts)
- throw new InterruptedIOException(Messages.PollingInputStream_readTimeout);
+ throw new InterruptedIOException(Messages.PollingInputStream_readTimeout);
if (Policy.DEBUG_STREAMS) System.out.println("read retry=" + attempts); //$NON-NLS-1$
}
}
}
-
+
/**
* Wraps the underlying stream's method.
* @param count - the number of bytes to be skipped.
@@ -152,12 +152,12 @@ public class PollingInputStream extends FilterInputStream {
} catch (InterruptedIOException e) {
if (e.bytesTransferred != 0) return e.bytesTransferred; // keep partial transfer
if (++attempts == numAttempts)
- throw new InterruptedIOException(Messages.PollingInputStream_readTimeout);
+ throw new InterruptedIOException(Messages.PollingInputStream_readTimeout);
if (Policy.DEBUG_STREAMS) 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.
@@ -169,12 +169,12 @@ public class PollingInputStream extends FilterInputStream {
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.
+ * 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.
*/
@@ -184,10 +184,10 @@ public class PollingInputStream extends FilterInputStream {
/**
* Checked whether the monitor for this stream has been cancelled. If the cancellable
- * flag is <code>false</code> then the monitor is never cancelled.
+ * 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();
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
index d0b683ccc..df12be8f9 100644
--- 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
@@ -33,7 +33,7 @@ public class PollingOutputStream extends FilterOutputStream {
private int numAttempts;
private IProgressMonitor monitor;
private boolean cancellable;
-
+
/**
* Creates a new polling output stream.
* @param out the underlying output stream
@@ -47,7 +47,7 @@ public class PollingOutputStream extends FilterOutputStream {
this.monitor = monitor;
this.cancellable = true;
}
-
+
/**
* Wraps the underlying stream's method.
* @throws OperationCanceledException if the progress monitor is canceled
@@ -64,12 +64,12 @@ public class PollingOutputStream extends FilterOutputStream {
return;
} catch (InterruptedIOException e) {
if (++attempts == numAttempts)
- throw new InterruptedIOException(Messages.PollingOutputStream_writeTimeout);
+ throw new InterruptedIOException(Messages.PollingOutputStream_writeTimeout);
if (Policy.DEBUG_STREAMS) System.out.println("write retry=" + attempts); //$NON-NLS-1$
}
}
}
-
+
/**
* Wraps the underlying stream's method.
* @throws OperationCanceledException if the progress monitor is canceled
@@ -95,7 +95,7 @@ public class PollingOutputStream extends FilterOutputStream {
attempts = 0; // made some progress, don't time out quite yet
}
if (++attempts == numAttempts) {
- e = new InterruptedIOException(Messages.PollingOutputStream_writeTimeout);
+ e = new InterruptedIOException(Messages.PollingOutputStream_writeTimeout);
e.bytesTransferred = count;
throw e;
}
@@ -126,7 +126,7 @@ public class PollingOutputStream extends FilterOutputStream {
attempts = 0; // made some progress, don't time out quite yet
}
if (++attempts == numAttempts) {
- e = new InterruptedIOException(Messages.PollingOutputStream_writeTimeout);
+ e = new InterruptedIOException(Messages.PollingOutputStream_writeTimeout);
e.bytesTransferred = count;
throw e;
}
@@ -134,7 +134,7 @@ public class PollingOutputStream extends FilterOutputStream {
}
}
}
-
+
/**
* Calls flush() then close() on the underlying stream.
* @throws OperationCanceledException if the progress monitor is canceled
@@ -156,16 +156,16 @@ public class PollingOutputStream extends FilterOutputStream {
} catch (InterruptedIOException e) {
if (checkCancellation()) throw new OperationCanceledException();
if (++attempts == numAttempts)
- throw new InterruptedIOException(Messages.PollingOutputStream_closeTimeout);
+ throw new InterruptedIOException(Messages.PollingOutputStream_closeTimeout);
if (Policy.DEBUG_STREAMS) 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.
+ * 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.
*/
@@ -175,15 +175,15 @@ public class PollingOutputStream extends FilterOutputStream {
/**
* Checked whether the monitor for this stream has been cancelled. If the cancellable
- * flag is <code>false</code> then the monitor is never cancelled.
+ * 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
index c496f87ff..b15cf7926 100644
--- 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
@@ -20,7 +20,7 @@ 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.
@@ -32,7 +32,7 @@ public abstract class ProgressMonitorInputStream extends FilterInputStream {
private long bytesRead = 0;
private long lastUpdate = -1;
private long nextUpdate = 0;
-
+
/**
* Creates a progress monitoring input stream.
* @param in the underlying input stream
@@ -78,7 +78,7 @@ public abstract class ProgressMonitorInputStream extends FilterInputStream {
}
return b;
}
-
+
/**
* Wraps the underlying stream's method.
* Updates the progress monitor if the next update increment has been reached.
@@ -100,7 +100,7 @@ public abstract class ProgressMonitorInputStream extends FilterInputStream {
throw e;
}
}
-
+
/**
* Wraps the underlying stream's method.
* Updates the progress monitor if the next update increment has been reached.
@@ -120,14 +120,14 @@ public abstract class ProgressMonitorInputStream extends FilterInputStream {
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);
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
index eae4d68a3..a225c255f 100644
--- 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
@@ -22,7 +22,7 @@ import org.eclipse.core.runtime.OperationCanceledException;
* 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.
@@ -30,7 +30,7 @@ import org.eclipse.core.runtime.OperationCanceledException;
public class SizeConstrainedInputStream extends FilterInputStream {
private boolean discardOnClose;
private long bytesRemaining;
-
+
/**
* Creates a size constrained input stream.
* @param in the underlying input stream, never actually closed by this filter
@@ -43,7 +43,7 @@ public class SizeConstrainedInputStream extends FilterInputStream {
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.
@@ -55,7 +55,7 @@ public class SizeConstrainedInputStream extends FilterInputStream {
while (bytesRemaining != 0 && skip(bytesRemaining) != 0);
}
} catch (OperationCanceledException e) {
- // The receiver is likely wrapping a PollingInputStream which could throw
+ // 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 {
@@ -73,7 +73,7 @@ public class SizeConstrainedInputStream extends FilterInputStream {
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.
@@ -87,7 +87,7 @@ public class SizeConstrainedInputStream extends FilterInputStream {
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.
@@ -109,7 +109,7 @@ public class SizeConstrainedInputStream extends FilterInputStream {
throw e;
}
}
-
+
/**
* Wraps the underlying stream's method.
* Simulates an end-of-file condition if the end of the constrained region has been reached.
@@ -128,7 +128,7 @@ public class SizeConstrainedInputStream extends FilterInputStream {
throw e;
}
}
-
+
/**
* Mark is not supported by the wrapper even if the underlying stream does, returns 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
index e511bde98..1d7858f89 100644
--- 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
@@ -42,7 +42,7 @@ public class TimeoutInputStream extends FilterInputStream {
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
/**
@@ -68,7 +68,7 @@ public class TimeoutInputStream extends FilterInputStream {
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;
@@ -103,7 +103,7 @@ public class TimeoutInputStream extends FilterInputStream {
if (thread != null) throw new InterruptedIOException();
}
}
-
+
/**
* Returns the number of unread bytes in the buffer.
* @throws IOException if an i/o error occurs
@@ -112,7 +112,7 @@ public class TimeoutInputStream extends FilterInputStream {
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,
@@ -127,7 +127,7 @@ public class TimeoutInputStream extends FilterInputStream {
notify();
return b;
}
-
+
/**
* Reads multiple bytes from the stream.
* @throws InterruptedIOException if the timeout expired and no data was received,
@@ -209,7 +209,7 @@ public class TimeoutInputStream extends FilterInputStream {
throw e;
}
}
-
+
/**
* Runs the thread in the background.
*/
@@ -223,7 +223,7 @@ public class TimeoutInputStream extends FilterInputStream {
try {
in.close();
} catch (IOException e) {
- synchronized (this) { ioe = e; }
+ synchronized (this) { ioe = e; }
} finally {
synchronized (this) {
thread = null;
@@ -232,7 +232,7 @@ public class TimeoutInputStream extends FilterInputStream {
}
}
}
-
+
/**
* Waits until we have been requested to close the stream.
*/
@@ -275,12 +275,12 @@ public class TimeoutInputStream extends FilterInputStream {
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
+ * that space will become available in the buffer after the read
* takes place).
*/
private synchronized void waitForRead() {
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
index 7dc9a5ce1..7ed2a4bb5 100644
--- 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
@@ -113,7 +113,7 @@ public class TimeoutOutputStream extends FilterOutputStream {
length++;
notify();
}
-
+
/**
* Writes multiple bytes to the stream.
* @throws InterruptedIOException if the timeout expired, bytesTransferred will
@@ -155,7 +155,7 @@ public class TimeoutOutputStream extends FilterOutputStream {
}
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
@@ -164,7 +164,7 @@ public class TimeoutOutputStream extends FilterOutputStream {
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);
+ if (waitingForClose) throw new IOException(Messages.TimeoutOutputStream_cannotWriteToStream);
notify();
try {
wait(writeTimeout);
@@ -200,7 +200,7 @@ public class TimeoutOutputStream extends FilterOutputStream {
try {
out.close();
} catch (IOException e) {
- synchronized (this) { ioe = e; }
+ synchronized (this) { ioe = e; }
} finally {
synchronized (this) {
thread = null;
@@ -250,7 +250,7 @@ public class TimeoutOutputStream extends FilterOutputStream {
bytesUntilFlush = length;
}
}
-
+
// If there are bytes to be written, write them
if (len != 0) {
// write out all remaining bytes from the buffer before flushing
@@ -262,7 +262,7 @@ public class TimeoutOutputStream extends FilterOutputStream {
len = e.bytesTransferred;
}
}
-
+
// If there was a pending flush, do it
if (bytesUntilFlush >= 0) {
bytesUntilFlush -= len;
@@ -275,7 +275,7 @@ public class TimeoutOutputStream extends FilterOutputStream {
bytesUntilFlush = -1; // might have been 0
}
}
-
+
// If bytes were written, update the circular buffer
if (len != 0) {
synchronized (this) {
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
index 3b9e346f2..c1ee04158 100644
--- 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
@@ -21,7 +21,7 @@ import org.eclipse.team.core.mapping.ISynchronizationScopeChangeListener;
/**
* An abstract implementation of an {@link ISynchronizationScope}.
- *
+ *
* @since 3.2
*/
public abstract class AbstractSynchronizationScope implements ISynchronizationScope {
@@ -44,7 +44,7 @@ public abstract class AbstractSynchronizationScope implements ISynchronizationSc
}
return (IResource[]) result.toArray(new IResource[result.size()]);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.mapping.ISynchronizationScope#contains(org.eclipse.core.resources.IResource)
*/
@@ -57,7 +57,7 @@ public abstract class AbstractSynchronizationScope implements ISynchronizationSc
}
return false;
}
-
+
/*
* Add the resource to the list if it isn't there already
* or is not a child of an existing resource.
@@ -77,7 +77,7 @@ public abstract class AbstractSynchronizationScope implements ISynchronizationSc
// 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)
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
index 01d8af75a..3daba8f6a 100644
--- 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
@@ -25,16 +25,16 @@ import org.osgi.service.prefs.Preferences;
* @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
@@ -54,7 +54,7 @@ public class ActiveChangeSet extends DiffChangeSet {
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
@@ -77,7 +77,7 @@ public class ActiveChangeSet extends DiffChangeSet {
}
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
@@ -118,7 +118,7 @@ public class ActiveChangeSet extends DiffChangeSet {
public boolean hasComment() {
return comment != null;
}
-
+
public void save(Preferences prefs) {
prefs.put(CTX_TITLE, getTitle());
if (comment != null) {
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
index 941fa5966..4f12c624b 100644
--- 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
@@ -33,7 +33,7 @@ import org.osgi.service.prefs.Preferences;
public abstract class ActiveChangeSetManager extends ChangeSetManager implements IDiffChangeListener, IChangeGroupingRequestor {
private static final String CTX_DEFAULT_SET = "defaultSet"; //$NON-NLS-1$
-
+
private ActiveChangeSet defaultSet;
/**
@@ -52,7 +52,7 @@ public abstract class ActiveChangeSetManager extends ChangeSetManager implements
}
return null;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.core.subscribers.ChangeSetManager#add(org.eclipse.team.internal.core.subscribers.ChangeSet)
*/
@@ -60,7 +60,7 @@ public abstract class ActiveChangeSetManager extends ChangeSetManager implements
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)
*/
@@ -70,7 +70,7 @@ public abstract class ActiveChangeSetManager extends ChangeSetManager implements
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)
*/
@@ -78,7 +78,7 @@ public abstract class ActiveChangeSetManager extends ChangeSetManager implements
((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.
@@ -88,7 +88,7 @@ public abstract class ActiveChangeSetManager extends ChangeSetManager implements
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)
*/
@@ -96,21 +96,21 @@ public abstract class ActiveChangeSetManager extends ChangeSetManager implements
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
@@ -258,7 +258,7 @@ public abstract class ActiveChangeSetManager extends ChangeSetManager implements
/**
* 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 or
* <code>null</code> to unset the default set
@@ -282,7 +282,7 @@ public abstract class ActiveChangeSetManager extends ChangeSetManager implements
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.
@@ -291,7 +291,7 @@ public abstract class ActiveChangeSetManager extends ChangeSetManager implements
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.
@@ -360,15 +360,15 @@ public abstract class ActiveChangeSetManager extends ChangeSetManager implements
try {
prefs.flush();
} catch (BackingStoreException e) {
- TeamPlugin.log(IStatus.ERROR, NLS.bind(Messages.SubscriberChangeSetCollector_3, new String[] { getName() }), 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
@@ -390,10 +390,10 @@ public abstract class ActiveChangeSetManager extends ChangeSetManager implements
}
return out.toString();
}
-
+
/**
* Load the manager's state from the given preferences node.
- *
+ *
* @param prefs
* a preferences node
*/
@@ -413,10 +413,10 @@ public abstract class ActiveChangeSetManager extends ChangeSetManager implements
}
}
} catch (BackingStoreException e) {
- TeamPlugin.log(IStatus.ERROR, NLS.bind(Messages.SubscriberChangeSetCollector_4, new String[] { getName() }), 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
@@ -424,7 +424,7 @@ public abstract class ActiveChangeSetManager extends ChangeSetManager implements
protected abstract String getName();
/**
- * Create a change set from the given preferences that were
+ * Create a change set from the given preferences that were
* previously saved.
* @param childPrefs the previously saved preferences
* @return the created change set
@@ -436,7 +436,7 @@ public abstract class ActiveChangeSetManager extends ChangeSetManager implements
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)
*/
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
index 09a9c52ea..c52cc1ae8 100644
--- 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
@@ -23,14 +23,14 @@ import org.eclipse.team.internal.core.Policy;
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;
}
@@ -91,13 +91,13 @@ public class BatchingChangeSetManager extends ChangeSetManager {
return collector;
}
}
-
+
public static interface IChangeSetCollectorChangeListener {
public void changeSetChanges(CollectorChangeEvent event, IProgressMonitor monitor);
}
-
+
private CollectorChangeEvent changes = new CollectorChangeEvent(this);
-
+
public void beginInput() {
lock.acquire();
}
@@ -105,7 +105,7 @@ public class BatchingChangeSetManager extends ChangeSetManager {
public void endInput(IProgressMonitor monitor) {
try {
if (lock.getDepth() == 1) {
- // Remain locked while firing the events so the handlers
+ // 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));
}
@@ -113,7 +113,7 @@ public class BatchingChangeSetManager extends ChangeSetManager {
lock.release();
}
}
-
+
private void fireChanges(final IProgressMonitor monitor) {
if (changes.isEmpty()) {
return;
@@ -136,7 +136,7 @@ public class BatchingChangeSetManager extends ChangeSetManager {
}
}
}
-
+
public void add(ChangeSet set) {
try {
beginInput();
@@ -146,7 +146,7 @@ public class BatchingChangeSetManager extends ChangeSetManager {
endInput(null);
}
}
-
+
public void remove(ChangeSet set) {
try {
beginInput();
@@ -156,7 +156,7 @@ public class BatchingChangeSetManager extends ChangeSetManager {
endInput(null);
}
}
-
+
protected void fireResourcesChangedEvent(ChangeSet changeSet, IPath[] allAffectedResources) {
super.fireResourcesChangedEvent(changeSet, allAffectedResources);
try {
@@ -166,7 +166,7 @@ public class BatchingChangeSetManager extends ChangeSetManager {
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
index 6f27f4f38..0fcf72138 100644
--- 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
@@ -23,10 +23,10 @@ import org.eclipse.team.internal.core.*;
* 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
+ * 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
+ * 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>
@@ -41,7 +41,7 @@ public class BatchingLock {
return false;
}
};
-
+
public class ThreadInfo {
private Set changedResources = new HashSet();
private IFlushOperation operation;
@@ -53,7 +53,7 @@ public class BatchingLock {
* 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
+ * @param monitor
* @return the scheduling rule that was obtained
*/
public ISchedulingRule pushRule(ISchedulingRule resource, IProgressMonitor monitor) {
@@ -88,11 +88,11 @@ public class BatchingLock {
}
/**
* Pop the scheduling rule from the stack and release it if it
- * is not the workspace root. Flush any changed sync info to
+ * 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 rule
* @param monitor
* @throws TeamException
*/
@@ -150,7 +150,7 @@ public class BatchingLock {
/**
* 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() {
@@ -198,7 +198,7 @@ public class BatchingLock {
return true;
}
private void handleAbortedFlush(Throwable t) {
- TeamPlugin.log(IStatus.ERROR, Messages.BatchingLock_11, t);
+ TeamPlugin.log(IStatus.ERROR, Messages.BatchingLock_11, t);
}
private void addRule(ISchedulingRule rule) {
rules.add(rule);
@@ -216,13 +216,13 @@ public class BatchingLock {
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
@@ -234,7 +234,7 @@ public class BatchingLock {
return info;
}
}
-
+
private ThreadInfo getThreadInfo(IResource resource) {
synchronized (infos) {
for (Iterator iter = infos.values().iterator(); iter.hasNext();) {
@@ -246,7 +246,7 @@ public class BatchingLock {
return null;
}
}
-
+
public ISchedulingRule acquire(ISchedulingRule resourceRule, IFlushOperation operation, IProgressMonitor monitor) {
ThreadInfo info = getThreadInfo();
boolean added = false;
@@ -272,9 +272,9 @@ public class BatchingLock {
throw e;
}
}
-
+
/**
- * Create the ThreadInfo instance used to cache the lock state for the
+ * 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
@@ -291,7 +291,7 @@ public class BatchingLock {
* the the flush operation provided in the acquire method will be executed.
* @param rule the scheduling rule
* @param monitor a progress monitor
- * @throws TeamException
+ * @throws TeamException
*/
public void release(ISchedulingRule rule, IProgressMonitor monitor) throws TeamException {
ThreadInfo info = getThreadInfo();
@@ -316,7 +316,7 @@ public class BatchingLock {
/**
* Flush any changes accumulated by the lock so far.
* @param monitor a progress monitor
- * @throws TeamException
+ * @throws TeamException
*/
public void flush(IProgressMonitor monitor) throws TeamException {
ThreadInfo info = getThreadInfo();
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
index 944777106..31d374fbc 100644
--- 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
@@ -16,7 +16,7 @@ import org.eclipse.core.resources.IResource;
* A set that contains a group of related changes
*/
public abstract class ChangeSet {
-
+
private String name;
/**
@@ -27,7 +27,7 @@ public abstract class ChangeSet {
protected ChangeSet() {
super();
}
-
+
/**
* Create a change set with the given name.
* @param name the name of the change set
@@ -41,7 +41,7 @@ public abstract class ChangeSet {
* @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
@@ -54,13 +54,13 @@ public abstract class ChangeSet {
* @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
@@ -71,7 +71,7 @@ public abstract class ChangeSet {
remove(resource);
}
}
-
+
/**
* Remove the resource and it's descendants to the given depth.
* @param resource the resource to be removed
@@ -79,7 +79,7 @@ public abstract class ChangeSet {
* <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
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
index 96e6a7783..6164daae2 100644
--- 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
@@ -22,7 +22,7 @@ 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
@@ -30,7 +30,7 @@ public abstract class ChangeSetManager {
protected Object[] getListeners() {
return listeners.getListeners();
}
-
+
/**
* Method that can be invoked by subclasses when the name of
* a managed change set changes.
@@ -54,7 +54,7 @@ public abstract class ChangeSetManager {
}
}
}
-
+
/**
* Method which allows subclasses to notify listeners that the default
* set has changed.
@@ -77,7 +77,7 @@ public abstract class ChangeSetManager {
});
}
}
-
+
/**
* Add the set to the list of active sets.
* @param set the set to be added
@@ -175,7 +175,7 @@ public abstract class ChangeSetManager {
Set sets = internalGetSets();
return (ChangeSet[]) sets.toArray(new ChangeSet[sets.size()]);
}
-
+
/**
* Dispose of any resources maintained by the manager
*/
@@ -204,7 +204,7 @@ public abstract class ChangeSetManager {
});
}
}
-
+
private Set internalGetSets() {
if (sets == null) {
sets = Collections.synchronizedSet(new HashSet());
@@ -223,7 +223,7 @@ public abstract class ChangeSetManager {
* 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
index 514d041f6..473238e35 100644
--- 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
@@ -19,7 +19,7 @@ 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.
+ * 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,
@@ -29,13 +29,13 @@ import org.eclipse.team.core.synchronize.SyncInfoTree;
* @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
@@ -51,7 +51,7 @@ public abstract class CheckedInChangeSet extends ChangeSet {
public IResource[] getResources() {
return set.getResources();
}
-
+
/**
* Return whether the set contains any files.
* @return whether the set contains any files
@@ -68,7 +68,7 @@ public abstract class CheckedInChangeSet extends ChangeSet {
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.
@@ -79,7 +79,7 @@ public abstract class CheckedInChangeSet extends ChangeSet {
set.add(info);
}
}
-
+
/**
* Return whether the given sync info is a valid change
* and can be included in this set. This method is used
@@ -107,7 +107,7 @@ public abstract class CheckedInChangeSet extends ChangeSet {
set.endInput(null);
}
}
-
+
/**
* Remove the resource from the set.
* @param resource the resource to be removed
@@ -117,7 +117,7 @@ public abstract class CheckedInChangeSet extends ChangeSet {
set.remove(resource);
}
}
-
+
/**
* Remove the resources from the set.
* @param resources the resources to be removed
@@ -128,7 +128,7 @@ public abstract class CheckedInChangeSet extends ChangeSet {
remove(resource);
}
}
-
+
/**
* Remove the resource and it's descendants to the given depth.
* @param resource the resource to be removed
@@ -145,7 +145,7 @@ public abstract class CheckedInChangeSet extends ChangeSet {
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
index 9e2e05bca..7f99fcf4e 100644
--- 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
@@ -30,7 +30,7 @@ public class ContentComparator extends AbstractContentComparator{
/**
* Returns <code>true</code> if both input streams byte contents is
* identical.
- *
+ *
* @param is1
* first input to contents compare
* @param is2
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
index 5c520db9b..236e4435c 100644
--- 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
@@ -22,7 +22,7 @@ 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.
*/
@@ -36,7 +36,7 @@ public class ContentComparisonDiffFilter extends DiffFilter {
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
@@ -51,7 +51,7 @@ public class ContentComparisonDiffFilter extends DiffFilter {
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);
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
index b5f36b8ab..9645ac22b 100644
--- 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
@@ -34,18 +34,18 @@ import org.eclipse.team.core.variants.*;
* ways that invalidate the stored remote variants. For example, if the local
* resources are moved from the main trunk 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()
@@ -94,7 +94,7 @@ public abstract class DescendantResourceVariantByteStore extends ResourceVariant
return remoteStore.flushBytes(resource, IResource.DEPTH_ZERO);
} else {
return remoteStore.setBytes(resource, bytes);
- }
+ }
}
/* (non-Javadoc)
@@ -105,14 +105,14 @@ public abstract class DescendantResourceVariantByteStore extends ResourceVariant
}
/**
- * Return <code>true</code> if the variant associated with the given local
+ * 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
+ * @return <code>true</code> if the variant associated with the given local
* resource has been cached.
* @throws TeamException
*/
@@ -129,7 +129,7 @@ public abstract class DescendantResourceVariantByteStore extends ResourceVariant
* @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)
*/
@@ -153,7 +153,7 @@ public abstract class DescendantResourceVariantByteStore extends ResourceVariant
protected ResourceVariantByteStore getRemoteStore() {
return remoteStore;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.core.subscribers.caches.ResourceVariantByteStore#members(org.eclipse.core.resources.IResource)
*/
@@ -174,7 +174,7 @@ public abstract class DescendantResourceVariantByteStore extends ResourceVariant
}
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)
*/
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
index e0e2985fe..d29fd15b3 100644
--- 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
@@ -19,15 +19,15 @@ 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
@@ -35,7 +35,7 @@ public class DiffChangeSet extends ChangeSet {
public IResourceDiffTree getDiffTree() {
return tree;
}
-
+
protected ResourceDiffTree internalGetDiffTree() {
return tree;
}
@@ -47,7 +47,7 @@ public class DiffChangeSet extends ChangeSet {
public IResource[] getResources() {
return tree.getAffectedResources();
}
-
+
/**
* Return whether the set contains any files.
* @return whether the set contains any files
@@ -64,7 +64,7 @@ public class DiffChangeSet extends ChangeSet {
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.
@@ -75,7 +75,7 @@ public class DiffChangeSet extends ChangeSet {
tree.add(diff);
}
}
-
+
/**
* Return whether the given sync info is a valid change
* and can be included in this set. This method is used
@@ -103,7 +103,7 @@ public class DiffChangeSet extends ChangeSet {
tree.endInput(null);
}
}
-
+
/**
* Remove the resource from the set.
* @param resource the resource to be removed
@@ -113,7 +113,7 @@ public class DiffChangeSet extends ChangeSet {
tree.remove(resource);
}
}
-
+
/**
* Remove the resource and it's descendants to the given depth.
* @param resource the resource to be removed
@@ -136,11 +136,11 @@ public class DiffChangeSet extends ChangeSet {
}
}
}
-
+
public boolean contains(IPath path) {
return getDiffTree().getDiff(path) != null;
}
-
+
public boolean containsChildren(IResource resource, int depth) {
return getDiffTree().getDiffs(resource, depth).length > 0;
}
@@ -156,7 +156,7 @@ public class DiffChangeSet extends ChangeSet {
tree.endInput(null);
}
}
-
+
public void remove(IResource[] resources) {
try {
tree.beginInput();
@@ -168,7 +168,7 @@ public class DiffChangeSet extends ChangeSet {
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
index ceacbfa73..13706b9c6 100644
--- 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
@@ -34,19 +34,19 @@ public class DiffTreeStatistics {
}
stats.put(new Integer(state), new Long(count.longValue() + 1));
}
-
+
/**
* Remove this sync kind.
- * @param state the info type to remove
- */
+ * @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 {
+ // programmer error calling remove before add.
+ } else {
long newCount = count.intValue() - 1;
if(newCount > 0) {
stats.put(kind, new Long(newCount));
@@ -55,13 +55,13 @@ public class DiffTreeStatistics {
}
}
}
-
+
/**
* Return the count of sync infos for the specified sync kind. A mask can be used to accumulate
* 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
@@ -93,7 +93,7 @@ public class DiffTreeStatistics {
public void clear() {
stats.clear();
}
-
+
/**
* For debugging
*/
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
index b67f60932..9d9a9d0fc 100644
--- 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
@@ -24,22 +24,22 @@ public interface IChangeSetChangeListener {
* @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 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
@@ -48,7 +48,7 @@ public interface IChangeSetChangeListener {
/**
* The state of the given resources have change with respect to the
- * given set. This means that the resource have either been added
+ * 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
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
index 2988ff72c..2d7466c62 100644
--- 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
@@ -28,22 +28,22 @@ 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);
}
@@ -57,7 +57,7 @@ public class SubscriberChangeSetManager extends ActiveChangeSetManager {
throw new OperationCanceledException();
dispatchEvents.add(event);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.core.BackgroundEventHandler#doDispatchEvents(org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -98,7 +98,7 @@ public class SubscriberChangeSetManager extends ActiveChangeSetManager {
}
/*
- * Begin input on all the sets and return the sync sets that were
+ * 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
*/
@@ -143,13 +143,13 @@ public class SubscriberChangeSetManager extends ActiveChangeSetManager {
} 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);
+ 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)
*/
@@ -157,7 +157,7 @@ public class SubscriberChangeSetManager extends ActiveChangeSetManager {
// Override to allow access from enclosing class
super.queueEvent(event, front);
}
-
+
/*
* Handle the removal
*/
@@ -165,7 +165,7 @@ public class SubscriberChangeSetManager extends ActiveChangeSetManager {
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
+ // 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);
@@ -175,7 +175,7 @@ public class SubscriberChangeSetManager extends ActiveChangeSetManager {
}
}
}
-
+
/*
* Handle the change
*/
@@ -207,7 +207,7 @@ public class SubscriberChangeSetManager extends ActiveChangeSetManager {
}
}
}
-
+
private void removeFromAllSets(IResource resource) {
List toRemove = new ArrayList();
ChangeSet[] sets = getSets();
@@ -238,7 +238,7 @@ public class SubscriberChangeSetManager extends ActiveChangeSetManager {
return (ActiveChangeSet[]) result.toArray(new ActiveChangeSet[result.size()]);
}
}
-
+
private class ResourceCollector extends SubscriberResourceCollector {
public ResourceCollector(Subscriber subscriber) {
@@ -260,24 +260,24 @@ public class SubscriberChangeSetManager extends ActiveChangeSetManager {
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() })); //
+ 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++) {
@@ -301,7 +301,7 @@ public class SubscriberChangeSetManager extends ActiveChangeSetManager {
Subscriber subscriber = getSubscriber();
return subscriber.getDiff(resource);
}
-
+
/**
* Return the subscriber associated with this collector.
* @return the subscriber associated with this collector
@@ -323,15 +323,15 @@ public class SubscriberChangeSetManager extends ActiveChangeSetManager {
private Preferences getPreferences() {
return getParentPreferences().node(getSubscriberIdentifier());
}
-
+
private static Preferences getParentPreferences() {
return getTeamPreferences().node(PREF_CHANGE_SETS);
}
-
+
private static Preferences getTeamPreferences() {
return InstanceScope.INSTANCE.getNode(TeamPlugin.getPlugin().getBundle().getSymbolicName());
}
-
+
/**
* Return the id that will uniquely identify the subscriber across
* restarts.
@@ -344,7 +344,7 @@ public class SubscriberChangeSetManager extends ActiveChangeSetManager {
/**
* Wait until the collector is done processing any events.
* This method is for testing purposes only.
- * @param monitor
+ * @param monitor
*/
public void waitUntilDone(IProgressMonitor monitor) {
monitor.worked(1);
@@ -352,7 +352,7 @@ public class SubscriberChangeSetManager extends ActiveChangeSetManager {
while(handler.getEventHandlerJob().getState() != Job.NONE) {
monitor.worked(1);
try {
- Thread.sleep(10);
+ Thread.sleep(10);
} catch (InterruptedException e) {
}
Policy.checkCanceled(monitor);
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
index 236a10ac3..ac568651e 100644
--- 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
@@ -34,12 +34,12 @@ public class SubscriberDiffTreeEventHandler extends SubscriberEventHandler {
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;
@@ -62,7 +62,7 @@ public class SubscriberDiffTreeEventHandler extends SubscriberEventHandler {
return node;
}
}
-
+
/*
* Collects resource and subscriber changes
*/
@@ -93,7 +93,7 @@ public class SubscriberDiffTreeEventHandler extends SubscriberEventHandler {
SubscriberDiffTreeEventHandler.this.change(resource, depth);
}
}
-
+
/**
* Create the handler
* @param subscriber the subscriber for the handler
@@ -138,12 +138,12 @@ public class SubscriberDiffTreeEventHandler extends SubscriberEventHandler {
super.reset(traversals, type);
}
}
-
+
public void reset(){
reset(getScope().getTraversals(),
SubscriberEventHandler.SubscriberEvent.INITIALIZE);
}
-
+
protected void prepareScope(IProgressMonitor monitor) {
try {
manager.initialize(monitor);
@@ -248,21 +248,21 @@ public class SubscriberDiffTreeEventHandler extends SubscriberEventHandler {
}
/**
- * Return the resource diff tree that contains the out-of-sync diffs for the
+ * 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()
*/
@@ -278,7 +278,7 @@ public class SubscriberDiffTreeEventHandler extends SubscriberEventHandler {
protected Object getJobFamiliy() {
return family;
}
-
+
/**
* Set the family of this handler to the given object
* @param family the family of the handler's job
@@ -286,7 +286,7 @@ public class SubscriberDiffTreeEventHandler extends SubscriberEventHandler {
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)
*/
@@ -295,7 +295,7 @@ public class SubscriberDiffTreeEventHandler extends SubscriberEventHandler {
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)
*/
@@ -336,20 +336,20 @@ public class SubscriberDiffTreeEventHandler extends SubscriberEventHandler {
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)
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
index 7dd78d455..3a183527a 100644
--- 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
@@ -31,7 +31,7 @@ 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.
*/
@@ -39,7 +39,7 @@ 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;
@@ -51,7 +51,7 @@ public abstract class SubscriberEventHandler extends BackgroundEventHandler {
private ISynchronizationScope scope;
private ISynchronizationScopeChangeListener scopeChangeListener;
-
+
/**
* Internal resource synchronization event. Can contain a result.
*/
@@ -79,7 +79,7 @@ public abstract class SubscriberEventHandler extends BackgroundEventHandler {
return new ResourceTraversal(new IResource[] { getResource() }, getDepth(), IResource.NONE);
}
}
-
+
/**
* Create a handler. This will initialize all resources for the subscriber associated with
* the set.
@@ -88,7 +88,7 @@ public abstract class SubscriberEventHandler extends BackgroundEventHandler {
*/
public SubscriberEventHandler(Subscriber subscriber, ISynchronizationScope scope) {
super(
- NLS.bind(Messages.SubscriberEventHandler_jobName, new String[] { subscriber.getName() }),
+ NLS.bind(Messages.SubscriberEventHandler_jobName, new String[] { subscriber.getName() }),
NLS.bind(Messages.SubscriberEventHandler_errors, new String[] { subscriber.getName() }));
this.subscriber = subscriber;
this.scope = scope;
@@ -101,7 +101,7 @@ public abstract class SubscriberEventHandler extends BackgroundEventHandler {
};
this.scope.addScopeChangeListener(scopeChangeListener);
}
-
+
/**
* The traversals of the scope have changed
* @param oldTraversals the old traversals
@@ -112,7 +112,7 @@ public abstract class SubscriberEventHandler extends BackgroundEventHandler {
}
/**
- * Start the event handler by queuing events to prime the sync set input with the out-of-sync
+ * 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() {
@@ -149,8 +149,8 @@ public abstract class SubscriberEventHandler extends BackgroundEventHandler {
protected boolean isSystemJob() {
return !initializing;
}
-
-
+
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.core.BackgroundEventHandler#jobDone(org.eclipse.core.runtime.jobs.IJobChangeEvent)
*/
@@ -158,17 +158,17 @@ public abstract class SubscriberEventHandler extends BackgroundEventHandler {
super.jobDone(event);
progressGroup = null;
}
-
+
/**
* Called by a client to indicate that a resource has changed and its synchronization state
- * should be recalculated.
+ * 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.
@@ -178,7 +178,7 @@ public abstract class SubscriberEventHandler extends BackgroundEventHandler {
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.
@@ -187,12 +187,12 @@ public abstract class SubscriberEventHandler extends BackgroundEventHandler {
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 {
@@ -210,16 +210,16 @@ public abstract class SubscriberEventHandler extends BackgroundEventHandler {
// 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() }));
+ 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() }));
+ 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() }));
+ handleException(e, resource, ITeamStatus.RESOURCE_SYNC_INFO_ERROR, NLS.bind(Messages.SubscriberEventHandler_9, new String[] { resource.getFullPath().toString(), e.getMessage() }));
}
monitor.worked(1);
}
@@ -261,7 +261,7 @@ public abstract class SubscriberEventHandler extends BackgroundEventHandler {
/**
* 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.
+ * 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
@@ -273,11 +273,11 @@ public abstract class SubscriberEventHandler extends BackgroundEventHandler {
/**
* Feed the given events to the set. The appropriate method on the set is called
- * for each event type.
+ * 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.
@@ -313,7 +313,7 @@ public abstract class SubscriberEventHandler extends BackgroundEventHandler {
monitor);
break;
case SubscriberEvent.INITIALIZE :
- monitor.subTask(NLS.bind(Messages.SubscriberEventHandler_2, new String[] { event.getResource().getFullPath().toString() }));
+ monitor.subTask(NLS.bind(Messages.SubscriberEventHandler_2, new String[] { event.getResource().getFullPath().toString() }));
collectAll(
event.getResource(),
((ResourceEvent)event).getDepth(),
@@ -321,9 +321,9 @@ public abstract class SubscriberEventHandler extends BackgroundEventHandler {
break;
}
} catch (OperationCanceledException e) {
- // the job has been canceled.
+ // the job has been canceled.
// Clear the queue and propagate the cancellation through the sets.
- handleCancel(e);
+ handleCancel(e);
} catch (RuntimeException e) {
// handle the exception and keep processing
if (event.getType() == BackgroundEventHandler.RUNNABLE_EVENT ) {
@@ -349,7 +349,7 @@ public abstract class SubscriberEventHandler extends BackgroundEventHandler {
protected void handleCancel(OperationCanceledException e) {
resultCache.clear();
}
-
+
/*
* Execute the RunnableEvent
*/
@@ -392,12 +392,12 @@ public abstract class SubscriberEventHandler extends BackgroundEventHandler {
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()) {
@@ -413,7 +413,7 @@ public abstract class SubscriberEventHandler extends BackgroundEventHandler {
protected ISynchronizationScope getScope() {
return scope;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.core.BackgroundEventHandler#shutdown()
*/
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
index 352a92ef4..bde9700a0 100644
--- 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
@@ -21,9 +21,9 @@ import org.eclipse.team.core.subscribers.*;
* 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.
@@ -35,24 +35,24 @@ public abstract class SubscriberResourceCollector implements IResourceChangeList
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);
+ getSubscriber().removeListener(this);
ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.sync.ITeamResourceChangeListener#teamResourceChanged(org.eclipse.team.core.sync.TeamDelta[])
*/
@@ -91,7 +91,7 @@ public abstract class SubscriberResourceCollector implements IResourceChangeList
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
@@ -100,7 +100,7 @@ public abstract class SubscriberResourceCollector implements IResourceChangeList
protected void endInput() {
// Do nothing by default
}
-
+
/*(non-Javadoc)
* @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
@@ -113,11 +113,11 @@ public abstract class SubscriberResourceCollector implements IResourceChangeList
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) {
@@ -126,7 +126,7 @@ public abstract class SubscriberResourceCollector implements IResourceChangeList
if (resource.getType() == IResource.PROJECT) {
// Handle projects that should be removed from the collector
- if (((kind & IResourceDelta.REMOVED) != 0) /* deleted project */
+ 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
@@ -145,14 +145,14 @@ public abstract class SubscriberResourceCollector implements IResourceChangeList
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);
@@ -167,7 +167,7 @@ public abstract class SubscriberResourceCollector implements IResourceChangeList
}
}
}
-
+
/**
* 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
@@ -187,7 +187,7 @@ public abstract class SubscriberResourceCollector implements IResourceChangeList
* 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
@@ -203,7 +203,7 @@ public abstract class SubscriberResourceCollector implements IResourceChangeList
* @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.
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
index 150a987d5..8a49a57cd 100644
--- 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
@@ -19,7 +19,7 @@ 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
+ * 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>
@@ -34,7 +34,7 @@ public final class SubscriberSyncInfoCollector extends SubscriberResourceCollect
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
@@ -57,13 +57,13 @@ public final class SubscriberSyncInfoCollector extends SubscriberResourceCollect
});
}
-
+
public void setProgressGroup(IProgressMonitor monitor, int ticks) {
getEventHandler().setProgressGroupHint(monitor, ticks);
}
-
+
/**
- * Start the collector.
+ * Start the collector.
*/
public void start() {
eventHandler.start();
@@ -72,7 +72,7 @@ public final class SubscriberSyncInfoCollector extends SubscriberResourceCollect
/**
* This causes the calling thread to wait any background collection of
* out-of-sync resources to stop before returning.
- *
+ *
* @param monitor
* a progress monitor
*/
@@ -86,24 +86,24 @@ public final class SubscriberSyncInfoCollector extends SubscriberResourceCollect
} catch (InterruptedException e) {
}
Policy.checkCanceled(monitor);
-
- // increment the counter or reset it if the job is running
+
+ // increment the counter or reset it if the job is running
i = (eventHandler.getEventHandlerJob().getState() == Job.NONE) ? i + 1 : 0;
-
- // 50 positive checks in a row
+
+ // 50 positive checks in a row
if (i == 50)
break;
}
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
+ * caller wishes to wait for the reset to complete, they should call
* waitForCollector(IProgressMonitor).
*/
- public void reset() {
+ public void reset() {
eventHandler.reset(getRoots());
}
@@ -120,7 +120,7 @@ public final class SubscriberSyncInfoCollector extends SubscriberResourceCollect
}
super.dispose();
}
-
+
/**
* Return the roots that are being considered by this collector.
* By default, the collector is interested in the roots of its
@@ -134,17 +134,17 @@ public final class SubscriberSyncInfoCollector extends SubscriberResourceCollect
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
+ * @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
@@ -155,7 +155,7 @@ public final class SubscriberSyncInfoCollector extends SubscriberResourceCollect
protected SubscriberEventHandler getEventHandler() {
return eventHandler;
}
-
+
/**
* Return the <code>SyncInfoSet</code> that contains 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
@@ -166,11 +166,11 @@ public final class SubscriberSyncInfoCollector extends SubscriberResourceCollect
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.
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
index 046843646..cc5ed5b17 100644
--- 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
@@ -24,11 +24,11 @@ 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;
@@ -40,13 +40,13 @@ public class SubscriberSyncInfoEventHandler extends SubscriberEventHandler {
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
@@ -65,7 +65,7 @@ public class SubscriberSyncInfoEventHandler extends SubscriberEventHandler {
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)
*/
@@ -73,7 +73,7 @@ public class SubscriberSyncInfoEventHandler extends SubscriberEventHandler {
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
@@ -81,7 +81,7 @@ public class SubscriberSyncInfoEventHandler extends SubscriberEventHandler {
public SyncSetInputFromSubscriber getSyncSetInput() {
return syncSetInput;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.core.subscribers.SubscriberEventHandler#handleChange(org.eclipse.core.resources.IResource)
*/
@@ -96,7 +96,7 @@ public class SubscriberSyncInfoEventHandler extends SubscriberEventHandler {
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)
*/
@@ -104,10 +104,10 @@ public class SubscriberSyncInfoEventHandler extends SubscriberEventHandler {
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;
@@ -130,7 +130,7 @@ public class SubscriberSyncInfoEventHandler extends SubscriberEventHandler {
super.worked(work);
}
};
-
+
// Create a sync set that queues up resources and errors for dispatch
SyncInfoSet collectionSet = new SyncInfoSet() {
public void add(SyncInfo info) {
@@ -158,9 +158,9 @@ public class SubscriberSyncInfoEventHandler extends SubscriberEventHandler {
new SubscriberEvent(resource, SubscriberEvent.REMOVAL, IResource.DEPTH_ZERO));
}
};
-
+
syncSetInput.getSubscriber().collectOutOfSync(new IResource[] { resource }, depth, collectionSet, collectionMonitor);
-
+
} finally {
monitor.done();
}
@@ -192,7 +192,7 @@ public class SubscriberSyncInfoEventHandler extends SubscriberEventHandler {
syncSet.endInput(monitor);
}
}
-
+
/**
* Initialize all resources for the subscriber associated with the set. This
* will basically recalculate all synchronization information for the
@@ -200,7 +200,7 @@ public class SubscriberSyncInfoEventHandler extends SubscriberEventHandler {
* <p>
* This method is synchronized with the queueEvent method to ensure that the
* two events queued by this method are back-to-back.
- *
+ *
* @param roots
* the new roots or <code>null</code> if the roots from the
* subscriber should be used.
@@ -211,7 +211,7 @@ public class SubscriberSyncInfoEventHandler extends SubscriberEventHandler {
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[])
*/
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
index 441093f59..ddc71bcc3 100644
--- 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
@@ -18,25 +18,25 @@ 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.
+ * 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)
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
index 0739562cf..f48d06aaa 100644
--- 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
@@ -15,7 +15,7 @@ import org.eclipse.team.core.TeamException;
import org.eclipse.team.internal.core.Messages;
/**
- * Utility for managing slash separated sync information fields.
+ * Utility for managing slash separated sync information fields.
*/
public class SyncByteConverter {
@@ -32,7 +32,7 @@ public class SyncByteConverter {
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) }));
+ 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;
@@ -52,7 +52,7 @@ public class SyncByteConverter {
* 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
@@ -63,11 +63,11 @@ public class SyncByteConverter {
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
@@ -85,7 +85,7 @@ public class SyncByteConverter {
// the Nth delimeter was not found
return -1;
}
-
+
/**
* Get the bytes in the given slot.
* @param bytes the sync bytes
@@ -117,7 +117,7 @@ public class SyncByteConverter {
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++) {
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
index 1e869e5b9..39b4a5e75 100644
--- 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
@@ -35,19 +35,19 @@ public class SyncInfoStatistics {
}
stats.put(new Integer(info.getKind()), new Long(count.longValue() + 1));
}
-
+
/**
* Remove this sync kind.
- * @param info the info type to remove
- */
+ * @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 {
+ // programmer error calling remove before add.
+ } else {
long newCount = count.intValue() - 1;
if(newCount > 0) {
stats.put(kind, new Long(newCount));
@@ -56,13 +56,13 @@ public class SyncInfoStatistics {
}
}
}
-
+
/**
* 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
@@ -91,7 +91,7 @@ public class SyncInfoStatistics {
public void clear() {
stats.clear();
}
-
+
/**
* For debugging
*/
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
index f75e185af..5a4d9ec5a 100644
--- 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
@@ -87,7 +87,7 @@ public class SyncInfoTreeChangeEvent extends SyncInfoSetChangeEvent implements I
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
index a43990d32..c118f3878 100644
--- 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
@@ -24,7 +24,7 @@ import org.eclipse.team.internal.core.TeamPlugin;
public class SyncInfoWorkingSetFilter extends FastSyncInfoFilter {
private IResource[] resources;
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.sync.SyncInfoFilter#select(org.eclipse.team.core.subscribers.SyncInfo)
*/
@@ -52,14 +52,14 @@ public class SyncInfoWorkingSetFilter extends FastSyncInfoFilter {
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++) {
@@ -99,11 +99,11 @@ public class SyncInfoWorkingSetFilter extends FastSyncInfoFilter {
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/SyncSetInput.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInput.java
index 4d8dc0414..d463fe62e 100644
--- 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
@@ -20,18 +20,18 @@ 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.
@@ -42,13 +42,13 @@ public abstract class SyncSetInput {
* 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);
@@ -81,7 +81,7 @@ public abstract class SyncSetInput {
syncSet.remove(resource);
}
}
-
+
public SyncInfoFilter getFilter() {
return 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
index 4d1ec78b5..09f7d7b59 100644
--- 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
@@ -16,7 +16,7 @@ import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.subscribers.Subscriber;
/**
- * Records resource synchronization changes from a Team subscriber. The actual changes
+ * 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 {
@@ -27,29 +27,29 @@ public class SyncSetInputFromSubscriber extends SyncSetInput {
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.
+ // 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
+ * 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
+ * @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
index 1aa887c66..87da1959b 100644
--- 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
@@ -28,7 +28,7 @@ public class SyncSetInputFromSyncSet extends SyncSetInput implements ISyncInfoSe
this.inputSyncSet = set;
inputSyncSet.addSyncSetChangedListener(this);
}
-
+
public void disconnect() {
if (inputSyncSet == null) return;
inputSyncSet.removeSyncSetChangedListener(this);
@@ -54,7 +54,7 @@ public class SyncSetInputFromSyncSet extends SyncSetInput implements ISyncInfoSe
try {
syncSet.beginInput();
monitor.beginTask(null, 105);
- syncSetChanged(event.getChangedResources(), Policy.subMonitorFor(monitor, 50));
+ syncSetChanged(event.getChangedResources(), Policy.subMonitorFor(monitor, 50));
syncSetChanged(event.getAddedResources(), Policy.subMonitorFor(monitor, 50));
remove(event.getRemovedResources());
} finally {
@@ -67,13 +67,13 @@ public class SyncSetInputFromSyncSet extends SyncSetInput implements ISyncInfoSe
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);
}
@@ -95,7 +95,7 @@ public class SyncSetInputFromSyncSet extends SyncSetInput implements ISyncInfoSe
syncSet.endInput(Policy.subMonitorFor(monitor, 5));
monitor.done();
}
- }
+ }
}
/* (non-Javadoc)
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
index 8b8108589..c4a1a20cd 100644
--- 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
@@ -58,7 +58,7 @@ public final class ThreeWayBaseTree extends ResourceVariantTree {
return subscriber.getSynchronizer().members(resource);
}
}
-
+
/**
* Create a base resource variant tree that accesses the base bytes
* from a three-way synchronizer.
@@ -68,7 +68,7 @@ public final class ThreeWayBaseTree extends ResourceVariantTree {
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)
*/
@@ -109,5 +109,5 @@ public final class ThreeWayBaseTree extends ResourceVariantTree {
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
index 923d48215..9c71fc2a2 100644
--- 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
@@ -17,7 +17,7 @@ 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
+ * 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>
@@ -31,7 +31,7 @@ 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
@@ -42,7 +42,7 @@ public final class WorkingSetFilteredSyncInfoCollector {
* @param roots the roots of the out-of-sync resources to be collected
*/
public WorkingSetFilteredSyncInfoCollector(SubscriberSyncInfoCollector collector, IResource[] roots) {
- this.eventHandler = collector.getEventHandler();
+ 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());
@@ -52,11 +52,11 @@ public final class WorkingSetFilteredSyncInfoCollector {
}
});
}
-
+
/**
* 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.
+ * are in the collector's working set and match the collectors filter.
* @return a SyncInfoSet containing out-of-sync resources
*/
public SyncInfoTree getSyncInfoTree() {
@@ -66,10 +66,10 @@ public final class WorkingSetFilteredSyncInfoCollector {
/**
* 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
+ * caller wishes to wait for the reset to complete, they should call
* waitForCollector(IProgressMonitor).
*/
- public void reset() {
+ public void reset() {
workingSetInput.reset();
}
@@ -84,7 +84,7 @@ public final class WorkingSetFilteredSyncInfoCollector {
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
@@ -95,7 +95,7 @@ public final class WorkingSetFilteredSyncInfoCollector {
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.
@@ -105,7 +105,7 @@ public final class WorkingSetFilteredSyncInfoCollector {
filteredInput.setFilter(filter);
filteredInput.reset();
}
-
+
/**
* Return a <code>SyncInfoSet</code> that contains the out-of-sync elements
* from the subsciber sync info set filtered
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
index 9942f2001..a15b37616 100644
--- 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
@@ -15,16 +15,16 @@ 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.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
index f841c3285..22122abe4 100644
--- 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
@@ -322,7 +322,7 @@ public class TeamUIPlugin extends AbstractUIPlugin {
ImageDescriptor desc = ImageDescriptor.createFromURL(getImageUrl(imageUrl));
imageDescriptors.put(id, desc);
}
-
+
/**
* Returns the image descriptor for the given image ID.
* Returns null if there is no such image.
@@ -359,7 +359,7 @@ public class TeamUIPlugin extends AbstractUIPlugin {
public static final String FILE_CONFLICT_OVR = "ovr/confchg_ov.png"; //$NON-NLS-1$
public static final String FILE_ERROR_OVR = "ovr/error_co.png"; //$NON-NLS-1$
public static final String FILE_WARNING_OVR = "ovr/warning_co.png"; //$NON-NLS-1$
- public static final String FILE_HOURGLASS_OVR = "ovr/waiting_ovr.png"; //$NON-NLS-1$
+ public static final String FILE_HOURGLASS_OVR = "ovr/waiting_ovr.png"; //$NON-NLS-1$
/*
* Initializes the table of images used in this plugin. The plugin is
* provided because this method is called before the plugin staic
@@ -368,7 +368,7 @@ public class TeamUIPlugin extends AbstractUIPlugin {
*/
private void initializeImages(TeamUIPlugin plugin) {
// Overlays
-
+
privateCreateImageDescriptor(ISharedImages.IMG_DIRTY_OVR, FILE_DIRTY_OVR);
privateCreateImageDescriptor(ISharedImages.IMG_CONFLICT_OVR, FILE_CONFLICT_OVR);
privateCreateImageDescriptor(ISharedImages.IMG_CHECKEDIN_OVR, FILE_CHECKEDIN_OVR);
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
index 1a65ab370..635b345ae 100644
--- 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
@@ -57,7 +57,7 @@ public class TeamImages {
break;
case ISharedImages.IMG_HOURGLASS_OVR:
key = TeamUIPlugin.FILE_HOURGLASS_OVR;
- break;
+ break;
default:
key = id;
}

Back to the top