Package org.eclipse.emf.emfstore.server.model.versioning.operations

Examples of org.eclipse.emf.emfstore.server.model.versioning.operations.MultiReferenceOperation


   * @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;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.emf.emfstore.server.model.versioning.operations.MultiReferenceOperation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.