org.electrocodeogram.cpc.core.api.provider.merge
Interface IMergeResultPerspective


public interface IMergeResultPerspective

An IMergeResultPerspective describes the changes made during an IMergeProvider merge of local and remote clone data from either the local or the remote perspective.

It can be thought of as a "diff" which can be applied to the former clone data of the corresponding "side" and which will then yield the new merged clone data.

The resulting clone data for both "sides" will always be the same. But depending on the perspective a clone may fall into different "change categories".

Some examples:

Author:
vw

Method Summary
 java.util.List<IClone> getAddedClones()
          A list of new clones which were added due to actions on the other "side".
 java.util.List<IClone> getLostClones()
          A list of former clones of this "side" which were dropped due to merge conflicts.
 java.util.List<IClone> getModifiedClones()
          A list of former clones of this "side" for which the content was modified due to actions on the other "side".
 java.util.List<IClone> getMovedClones()
          A list of former clones of this "side" which were moved due to actions on the other "side".
 java.lang.String getName()
          Retrieves a human readable name for this perspective.
 java.util.List<IClone> getRemovedClones()
          A list of former clones of this "side" which were removed due to user actions on the other "side".
 java.util.List<IClone> getUnchangedClones()
          A list of former clones of this "side" which were not affected by this merge.
 

Method Detail

getName

java.lang.String getName()
Retrieves a human readable name for this perspective.
By default this is either "local" or "remote".

Returns:
the name for this perspective, never null.

getAddedClones

java.util.List<IClone> getAddedClones()
A list of new clones which were added due to actions on the other "side".

Due to the uniqueness of clone UUIDs a newly added clone can't be part of both perspectives.

The order of the IClone instances in this list is not defined.

Returns:
a list of IClone instances, may be empty, never null.

getMovedClones

java.util.List<IClone> getMovedClones()
A list of former clones of this "side" which were moved due to actions on the other "side".
This also includes clone instances which had any other values (beside the content) modified, i.e. extension data.

The order of the IClone instances in this list is not defined.

Returns:
a list of IClone instances, may be empty, never null.
See Also:
CloneModificationEvent.getMovedClones()

getModifiedClones

java.util.List<IClone> getModifiedClones()
A list of former clones of this "side" for which the content was modified due to actions on the other "side".

The order of the IClone instances in this list is not defined.

Returns:
a list of IClone instances, may be empty, never null.
See Also:
CloneModificationEvent.getModifiedClones()

getRemovedClones

java.util.List<IClone> getRemovedClones()
A list of former clones of this "side" which were removed due to user actions on the other "side".

Clones which were removed on both sides will be part of both perspectives.

The order of the IClone instances in this list is not defined.

Returns:
a list of IClone instances, may be empty, never null.

getLostClones

java.util.List<IClone> getLostClones()
A list of former clones of this "side" which were dropped due to merge conflicts.

Lost clones which existed on both sides will be part of both perspectives.

The order of the IClone instances in this list is not defined.

Returns:
a list of IClone instances, may be empty, never null.

getUnchangedClones

java.util.List<IClone> getUnchangedClones()
A list of former clones of this "side" which were not affected by this merge.

These clones are always part of both perspectives.

The order of the IClone instances in this list is not defined.

Returns:
a list of IClone instances, may be empty, never null.