public static class SyncInfoFilter.ContentComparisonSyncInfoFilter extends SyncInfoFilter
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
.
SyncInfoFilter.ContentComparisonSyncInfoFilter
Constructor and Description |
---|
SyncInfoFilter.ContentComparisonSyncInfoFilter()
Create a filter that does not ignore whitespace.
|
SyncInfoFilter.ContentComparisonSyncInfoFilter(boolean ignoreWhitespace)
Create a filter and configure how whitespace is handled.
|
Modifier and Type | Method and Description |
---|---|
boolean |
compareContents(IFile local,
IResourceVariant remote,
IProgressMonitor monitor)
Compare the contents of the local file and its variant.
|
boolean |
select(SyncInfo info,
IProgressMonitor monitor)
Return
true if the provided SyncInfo matches the filter. |
public SyncInfoFilter.ContentComparisonSyncInfoFilter()
public SyncInfoFilter.ContentComparisonSyncInfoFilter(boolean ignoreWhitespace)
ignoreWhitespace
- whether whitespace should be ignoredpublic boolean select(SyncInfo info, IProgressMonitor monitor)
SyncInfoFilter
true
if the provided SyncInfo
matches the filter.select
in class SyncInfoFilter
info
- the SyncInfo
to be testedmonitor
- a progress monitortrue
if the SyncInfo
matches the filterpublic boolean compareContents(IFile local, IResourceVariant remote, IProgressMonitor monitor)
select
method to compare the
contents of two non-null files.local
- a local fileremote
- a resource variant of the filemonitor
- a progress monitor
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.