Package org.eclipse.compare.patch
Class PatchConfiguration
java.lang.Object
org.eclipse.compare.patch.PatchConfiguration
A patch configuration allows clients to set parameters that control how a
 patch is applied.
- Since:
- 3.3
- See Also:
- Restriction:
- This class may be instantiated by clients but is not intended to be subclassed.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddHunkFilter(IHunkFilter filter) Adds a hunk filter.intgetFuzz()Return the fuzz factor to be used when applying a patch.Return an array of hunk filters that have been added to this configuration.intReturn the number of prefix segments to be stripped when attempting to apply a patch.getProperty(String key) Return the property associated with the given key ornullif there is no property for the key.booleanReturn whether whitespace should be ignored.booleanReturn whether the patch should be reversed when applied.voidremoveHunkFilter(IHunkFilter filter) Removes a hunk filter.voidsetFuzz(int fuzz) Set the fuzz factor to be used when applying a patch.voidsetIgnoreWhitespace(boolean ignoreWhitespace) Set whether whitespace should be ignoredvoidsetPrefixSegmentStripCount(int stripCount) Set the number of prefix segments to be stripped when attempting to apply a patch.voidsetProperty(String key, Object value) Set the property associated with the given keyvoidsetReversed(boolean reversed) Set whether the patch should be reversed when applied.
- 
Constructor Details- 
PatchConfigurationpublic PatchConfiguration()
 
- 
- 
Method Details- 
isReversedpublic boolean isReversed()Return whether the patch should be reversed when applied.- Returns:
- whether the patch should be reversed when applied
 
- 
setReversedpublic void setReversed(boolean reversed) Set whether the patch should be reversed when applied.- Parameters:
- reversed- whether the patch should be reversed when applied
 
- 
getPrefixSegmentStripCountpublic int getPrefixSegmentStripCount()Return the number of prefix segments to be stripped when attempting to apply a patch.- Returns:
- the number of prefix segments to be stripped when attempting to apply a patch
 
- 
setPrefixSegmentStripCountpublic void setPrefixSegmentStripCount(int stripCount) Set the number of prefix segments to be stripped when attempting to apply a patch.- Parameters:
- stripCount- the number of prefix segments to be stripped when attempting to apply a patch.
 
- 
getFuzzpublic int getFuzz()Return the fuzz factor to be used when applying a patch. If the fuzz factor is set to -1, then the patcher is to make a best effort to apply the patch by adjusting the fuzz factor accordingly.- Returns:
- the fuzz factor to be used when applying a patch.
 
- 
setFuzzpublic void setFuzz(int fuzz) Set the fuzz factor to be used when applying a patch.- Parameters:
- fuzz- the fuzz factor to be used when applying a patch.
 
- 
isIgnoreWhitespacepublic boolean isIgnoreWhitespace()Return whether whitespace should be ignored.- Returns:
- whether whitespace should be ignored
 
- 
setIgnoreWhitespacepublic void setIgnoreWhitespace(boolean ignoreWhitespace) Set whether whitespace should be ignored- Parameters:
- ignoreWhitespace- whether whitespace should be ignored
 
- 
getPropertyReturn the property associated with the given key ornullif there is no property for the key.- Parameters:
- key- the key
- Returns:
- the property associated with the given key or
 null
 
- 
setPropertySet the property associated with the given key- Parameters:
- key- the key
- value- the value to be associated with the key
 
- 
addHunkFilterAdds a hunk filter.- Parameters:
- filter- the filter
- Since:
- org.eclipse.compare.core 3.5
 
- 
removeHunkFilterRemoves a hunk filter.- Parameters:
- filter- the filter
- Since:
- org.eclipse.compare.core 3.5
 
- 
getHunkFiltersReturn an array of hunk filters that have been added to this configuration.- Returns:
- an array of hunk filters that have been added to this configuration
- Since:
- org.eclipse.compare.core 3.5
 
 
-