org.electrocodeogram.cpc.core.api.data.extension
Interface ICloneNonWsPositionExtension

All Superinterfaces:
java.lang.Cloneable, ICloneDataElement, ICloneObjectExtension, java.io.Serializable

public interface ICloneNonWsPositionExtension
extends ICloneObjectExtension

A special non-whitespace position object for IClone objects.
Contains start and end offset with whitespaces ( ,\t,\n,\r) ignored.

This extension is not persisted.

Used by the CoreClonePositionUtils and the CPC Reconciler module.

Author:
vw
See Also:
CoreClonePositionUtils.extractPositions(org.electrocodeogram.cpc.core.api.provider.data.ICloneFactoryProvider, java.util.List, String)

Method Summary
 int getEndNonWsOffset()
          Retrieves the non-whitespace end offset for this clone.
 int getStartNonWsOffset()
          Retrieves the non-whitespace start offset for the clone.
 void setEndNonWsOffset(int endNonWsOffset)
          Sets this extensions non-whitespace end offset.
 void setStartNonWsOffset(int startNonWsOffset)
          Sets this extensions non-whitespace start offset.
 
Methods inherited from interface org.electrocodeogram.cpc.core.api.data.ICloneObjectExtension
clone, getExtensionInterfaceClass, isPartial, setParentUuid, toString
 
Methods inherited from interface org.electrocodeogram.cpc.core.api.data.ICloneDataElement
isSealed, seal
 

Method Detail

getStartNonWsOffset

int getStartNonWsOffset()
Retrieves the non-whitespace start offset for the clone.

IMPORTANT: This value is not persisted and not automatically updated during document modifications.
If you need these values, you should update them yourself by calling:
CoreClonePositionUtils.extractPositions(ICloneFactoryProvider, List, String)

Returns:
the character offset to the beginning of the file at which the clone begins (whitespaces not included!). The character at this position is already part of the clone. First char is 0.

setStartNonWsOffset

void setStartNonWsOffset(int startNonWsOffset)
Sets this extensions non-whitespace start offset.

See Also:
getStartNonWsOffset()

getEndNonWsOffset

int getEndNonWsOffset()
Retrieves the non-whitespace end offset for this clone.

IMPORTANT: This value is not persisted and not automatically updated during document modifications.
If you need these values, you should update them yourself by calling:
CoreClonePositionUtils.extractPositions(org.electrocodeogram.cpc.core.api.provider.data.ICloneFactoryProvider, java.util.List, String)

Returns:
character offset to the beginning of the file, at which the clone ends (whitespaces not included!). The character at this position is still part of the clone. First char is 0.

setEndNonWsOffset

void setEndNonWsOffset(int endNonWsOffset)
Sets this extensions non-whitespace end offset.

See Also:
getEndNonWsOffset()