@Override public void visit(CDOAddFeatureDelta delta) { revision.add(delta.getFeature(), delta.getIndex(), delta.getValue()); }
@Override public void visit(CDOAddFeatureDelta delta) { if (isContainment(delta.getFeature())) { handleContainment(delta.getValue(), 1); } }
/** * Decides whether an ADD delta is to be taken (added to the result list) and returns <code>true</code> if it was * taken, <code>false</code> otherwise. Note that the passed ADD delta has to be copied prior to adding it to the * result list! */ protected boolean handleListDeltaAdd(List<CDOFeatureDelta> resultList, CDOAddFeatureDelta addDelta, List<CDOFeatureDelta> listToAdjust) { int index = addDelta.getIndex(); if (listToAdjust == null) { // listToAdjust is only null for the sourceFeatureDeltas. // In this case ignore a potential duplicate ADD delta. Object value = addDelta.getValue(); if (getTargetMap().get(value) instanceof CDORevision && getSourceMap().get(value) instanceof CDORevision) { // Remove ADD deltas for objects that have been added to source and target. // This can for example happen if a source is re-merged to target. return false; } } resultList.add(addDelta.copy()); if (listToAdjust != null) { adjustAfterAddition(listToAdjust, index); } return true; }
public void visit(CDOAddFeatureDelta featureChange) { persist(referrer, featureChange.getValue()); }
if (((CDOAddFeatureDelta)fd).getIndex() <= floatingIndex)
CDOList list = goalRevision.getList(addFeatureDelta.getFeature()); if (addFeatureDelta.getValue() instanceof CDOObject) ((InternalCDOObject)addFeatureDelta.getValue()).cdoInternalSetView(this); if (addFeatureDelta.getFeature().isUnique()) { if (list.contains(addFeatureDelta.getValue())) { featureIterator.remove(); continue; if (getObjectIfExists((CDOID) addFeatureDelta.getValue()) == null) { featureIterator.remove(); continue; list.add(addFeatureDelta.getValue()); ((CDOAddFeatureDeltaImpl)addFeatureDelta).setIndex(list.size() - 1);
public void visit(CDOAddFeatureDelta featureChange) { persist(referrer, featureChange.getValue()); }
int otherIndex = otherAdd.getIndex(); adjustAfterRemoval(otherChanges, otherIndex, addChange);
@Override public void visit(CDOAddFeatureDelta delta) { EStructuralFeature feature = delta.getFeature(); add(new CDODeltaNotificationImpl(object, Notification.ADD, feature, getOldValue(feature), delta.getValue(), delta.getIndex())); }
Object idOrObject = ((CDOAddFeatureDelta)featureDelta).getValue(); if (containmentOrWithOpposite || isNew(idOrObject))
@Override public void visit(CDOAddFeatureDelta delta) { EStructuralFeature feature = delta.getFeature(); add(new CDODeltaNotificationImpl(object, Notification.ADD, getEFeatureID(feature), getOldValue(feature), delta.getValue(), delta.getIndex())); }
Object idOrObject = ((CDOAddFeatureDelta)featureDelta).getValue(); if (containmentOrWithOpposite || isNew(idOrObject))
public void visit(CDOAddFeatureDelta delta) { if (TRACER.isEnabled()) { TRACER.format(" - insert at {0} value {1}", delta.getIndex(), delta.getValue()); //$NON-NLS-1$ } // make room for the new item shiftIndexes(delta.getIndex(), UNBOUNDED_SHIFT, +1); // create the item manipulations.add(ManipulationElement.createInsertedElement(delta.getIndex(), delta.getValue())); ++newListSize; }
public void visit(CDOAddFeatureDelta delta) { int startIndex = delta.getIndex(); int endIndex = lastIndex; if (TRACER.isEnabled()) { TRACER.format("Delta Adding at: {0}", startIndex); //$NON-NLS-1$ } if (startIndex <= endIndex) { // make room for the new item moveOneDown(accessor, id, oldVersion, newVersion, startIndex, endIndex); } // create the item addEntry(accessor, id, newVersion, startIndex, delta.getValue(), timestamp); ++lastIndex; }
public void visit(CDOAddFeatureDelta delta) { int startIndex = delta.getIndex(); int endIndex = lastIndex; if (TRACER.isEnabled()) { TRACER.format("Delta Adding at: {0}", startIndex); //$NON-NLS-1$ } if (startIndex <= endIndex) { // make room for the new item moveOneDown(accessor, id, branchID, oldVersion, newVersion, startIndex, endIndex); } // create the item addEntry(accessor, id, branchID, newVersion, startIndex, delta.getValue(), timestamp); ++lastIndex; }
public void visit(CDOAddFeatureDelta delta) { finishPendingRemove(); int startIndex = delta.getIndex(); int endIndex = lastIndex; if (TRACER.isEnabled()) { TRACER.format("Delta Adding at: {0}", startIndex); //$NON-NLS-1$ } if (startIndex <= endIndex) { // make room for the new item moveOneDown(accessor, id, oldVersion, newVersion, startIndex, endIndex); } // create the item addEntry(accessor, id, newVersion, startIndex, delta.getValue()); ++lastIndex; }
public void visit(CDOAddFeatureDelta delta) { finishPendingRemove(); int startIndex = delta.getIndex(); int endIndex = lastIndex; if (TRACER.isEnabled()) { TRACER.format("Delta Adding at: {0}", startIndex); //$NON-NLS-1$ } if (startIndex <= endIndex) { // make room for the new item moveOneDown(accessor, id, branchID, oldVersion, newVersion, startIndex, endIndex); } // create the item addEntry(accessor, id, branchID, newVersion, startIndex, delta.getValue()); ++lastIndex; }