Class SyncInfoFilter.ContentComparisonSyncInfoFilter
java.lang.Object
org.eclipse.team.core.synchronize.SyncInfoFilter
org.eclipse.team.core.synchronize.SyncInfoFilter.ContentComparisonSyncInfoFilter
- Enclosing class:
- SyncInfoFilter
Selects
SyncInfo
whose local and remote contents match.
This filter makes use of the IStorage
provided by
an IResourceVariant
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.
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
ConstructorDescriptionCreate a filter that does not ignore whitespace.ContentComparisonSyncInfoFilter
(boolean ignoreWhitespace) Create a filter and configure how whitespace is handled. -
Method Summary
Modifier and TypeMethodDescriptionboolean
compareContents
(IFile local, IResourceVariant remote, IProgressMonitor monitor) Compare the contents of the local file and its variant.boolean
select
(SyncInfo info, IProgressMonitor monitor) Returntrue
if the providedSyncInfo
matches the filter.
-
Constructor Details
-
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 Details
-
select
Description copied from class:SyncInfoFilter
Returntrue
if the providedSyncInfo
matches the filter.- Specified by:
select
in classSyncInfoFilter
- Parameters:
info
- theSyncInfo
to be testedmonitor
- a progress monitor- Returns:
true
if theSyncInfo
matches the filter
-
compareContents
Compare the contents of the local file and its variant. This is used by theselect
method 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
-