|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IPositionUpdateStrategyProvider
An IPositionUpdateStrategyProvider
specifies how clone entries should be affected by modifications to
a file. I.e. whether to consider text typed next to a clone to be part of the clone or not.
The CPC Track module uses the main IPositionUpdateStrategyProvider
for all clone position
modifications.
CPCPosition
,
CPCDocumentEvent
Method Summary | |
---|---|
void |
extractCloneData(org.eclipse.jface.text.Position[] positions,
java.util.List<IClone> movedClones,
java.util.List<IClone> modifiedClones,
java.util.List<IClone> removedClones,
org.eclipse.jface.text.IDocument document)
Takes an array of CPCPosition s and extracts any clone data modifications from it. |
boolean |
updatePositions(org.eclipse.jface.text.DocumentEvent event,
org.eclipse.jface.text.Position[] positions)
Updates the given positions in-place according to the given event. |
Methods inherited from interface org.electrocodeogram.cpc.core.api.provider.IProvider |
---|
getProviderName, toString |
Method Detail |
---|
boolean updatePositions(org.eclipse.jface.text.DocumentEvent event, org.eclipse.jface.text.Position[] positions)
IClone
elements inside of any affected CPCPosition
object are not updated.
NOTE: The signature of this interface was dictated by performance considerations.
To still allow reuse in other contexts an implementation must not make use of
any other methods of the encapsulated document object than IDocument.get()
and
IDocument.get(int, int)
.
A caller may provide a custom IDocument
implementation which supports only those two
methods.
NOTE: An implementation is not allowed to access an IStoreProvider
.
See comments in CPCPositionUpdater for more details.
event
- the event to process, never null. Make sure you understand the limitations of the
underlying IDocument
object if you implement this interface.positions
- an array with positions which should be updated, never null.
Positions are updated in place. All positions are guaranteed to be CPCPosition
objects.
CPCPosition
void extractCloneData(org.eclipse.jface.text.Position[] positions, java.util.List<IClone> movedClones, java.util.List<IClone> modifiedClones, java.util.List<IClone> removedClones, org.eclipse.jface.text.IDocument document)
CPCPosition
s and extracts any clone data modifications from it.
ICloneModificationHistoryExtension
.
positions
- an array of CPCPosition
s to extract data from, never null.movedClones
- an empty result list in which moved clones should be stored, never null.modifiedClones
- an empty result list in which modified clones should be stored, never null.removedClones
- an empty result list in which removed clones should be stored, never null.document
- optional parameter, if present any removed clone will also have its position removed from the document, may be NULL.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |