Eclipse Platform
Release 3.3

org.eclipse.compare.patch
Class PatchConfiguration

java.lang.Object
  extended byorg.eclipse.compare.patch.PatchConfiguration

public class PatchConfiguration
extends Object

A patch configuration allows clients to set parameters that control how a patch is applied.

This class may be instantiated by clients but is not intended to be subclassed.

Since:
3.3
See Also:
IFilePatch

Constructor Summary
PatchConfiguration()
           
 
Method Summary
 int getFuzz()
          Return the fuzz factor to be used when applying a patch.
 int getPrefixSegmentStripCount()
          Return the number of prefix segments to be stripped when attempting to apply a patch.
 Object getProperty(String key)
          Return the property associated with the given key or null if there is no property for the key.
 boolean isIgnoreWhitespace()
          Return whether whitespace should be ignored.
 boolean isReversed()
          Return whether the patch should be reversed when applied.
 void setFuzz(int fuzz)
          Set the fuzz factor to be used when applying a patch.
 void setIgnoreWhitespace(boolean ignoreWhitespace)
          Set whether whitespace should be ignored
 void setPrefixSegmentStripCount(int stripCount)
          Set the number of prefix segments to be stripped when attempting to apply a patch.
 void setProperty(String key, Object value)
          Set the property associated with the given key
 void setReversed(boolean reversed)
          Set whether the patch should be reversed when applied.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatchConfiguration

public PatchConfiguration()
Method Detail

isReversed

public boolean isReversed()
Return whether the patch should be reversed when applied.

Returns:
whether the patch should be reversed when applied

setReversed

public void setReversed(boolean reversed)
Set whether the patch should be reversed when applied.

Parameters:
reversed - whether the patch should be reversed when applied

getPrefixSegmentStripCount

public 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

setPrefixSegmentStripCount

public 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.

getFuzz

public 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.

setFuzz

public 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.

isIgnoreWhitespace

public boolean isIgnoreWhitespace()
Return whether whitespace should be ignored.

Returns:
whether whitespace should be ignored

setIgnoreWhitespace

public void setIgnoreWhitespace(boolean ignoreWhitespace)
Set whether whitespace should be ignored

Parameters:
ignoreWhitespace - whether whitespace should be ignored

getProperty

public Object getProperty(String key)
Return the property associated with the given key or null if there is no property for the key.

Parameters:
key - the key
Returns:
the property associated with the given key or null

setProperty

public void setProperty(String key,
                        Object value)
Set the property associated with the given key

Parameters:
key - the key
value - the value to be associated with the key

Eclipse Platform
Release 3.3

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.