Class SyncInfoFilter.ContentComparisonSyncInfoFilter
- java.lang.Object
-
- org.eclipse.team.core.synchronize.SyncInfoFilter
-
- org.eclipse.team.core.synchronize.SyncInfoFilter.ContentComparisonSyncInfoFilter
-
- Enclosing class:
- SyncInfoFilter
public static class SyncInfoFilter.ContentComparisonSyncInfoFilter extends SyncInfoFilter
SelectsSyncInfowhose local and remote contents match. This filter makes use of theIStorageprovided by anIResourceVariantto 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.For folders, the comparison always returns
true.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.team.core.synchronize.SyncInfoFilter
SyncInfoFilter.ContentComparisonSyncInfoFilter
-
-
Constructor Summary
Constructors Constructor Description ContentComparisonSyncInfoFilter()Create a filter that does not ignore whitespace.ContentComparisonSyncInfoFilter(boolean ignoreWhitespace)Create a filter and configure how whitespace is handled.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancompareContents(IFile local, IResourceVariant remote, IProgressMonitor monitor)Compare the contents of the local file and its variant.booleanselect(SyncInfo info, IProgressMonitor monitor)Returntrueif the providedSyncInfomatches the filter.
-
-
-
Constructor Detail
-
ContentComparisonSyncInfoFilter
public ContentComparisonSyncInfoFilter()
Create a filter that does not ignore whitespace.
-
ContentComparisonSyncInfoFilter
public ContentComparisonSyncInfoFilter(boolean ignoreWhitespace)
Create a filter and configure how whitespace is handled.- Parameters:
ignoreWhitespace- whether whitespace should be ignored
-
-
Method Detail
-
select
public boolean select(SyncInfo info, IProgressMonitor monitor)
Description copied from class:SyncInfoFilterReturntrueif the providedSyncInfomatches the filter.- Specified by:
selectin classSyncInfoFilter- Parameters:
info- theSyncInfoto be testedmonitor- a progress monitor- Returns:
trueif theSyncInfomatches the filter
-
compareContents
public boolean compareContents(IFile local, IResourceVariant remote, IProgressMonitor monitor)
Compare the contents of the local file and its variant. This is used by theselectmethod to compare the contents of two non-null files.- Parameters:
local- a local fileremote- a resource variant of the filemonitor- a progress monitor- Returns:
- whether the contents of the two files are equal
-
-