* @param op a CompositeOperation
* @return a List with the created a HistoryItem
*/
private List<AbstractHistoryItem> createPortingOperation(
CompositeOperation op) {
MultiReferenceOperation firstMoveOp = (MultiReferenceOperation) op.getSubOperations().get(0);
MultiReferenceOperation secondMoveOp = (MultiReferenceOperation) op.getSubOperations().get(0);
List<AbstractHistoryItem> result = new ArrayList<AbstractHistoryItem>();
String indexOldParent = new Integer(firstMoveOp.getIndex()).toString();
String indexNewParent = new Integer(secondMoveOp.getIndex()).toString();
Iterator<ModelElementId> interator = op.getOtherInvolvedModelElements().iterator();
ModelElementId modelElementId = interator.next();
ModelElementId newParent = interator.next();
ModelElementId oldParent = interator.next();
String oldFeatureName = firstMoveOp.getFeatureName();
String newFeatureName = secondMoveOp.getFeatureName();
result.add( new PortingHistoryItem(modelElementId, indexOldParent, indexNewParent, oldParent, newParent, oldFeatureName, newFeatureName, newFeatureName, firstMoveOp.getClientDate()));
return result;
}