protected Command createAddValueCommand(Object owner, Collection<Object> values) {
if (owner instanceof ServerDataStore) {
isServerPaste = true;
serverDataStore = (ServerDataStore) owner;
CompoundCommand command = new CompoundCommand();
for (Object value: values) {
ServerDataStoreEntryImpl entry = (ServerDataStoreEntryImpl) value;
command.append(AddCommand.create(editingDomain, owner, RfcPackage.Literals.SERVER_DATA_STORE__SERVER_DATA, entry.getValue()));
}
return command;
} else if (owner instanceof DestinationDataStore) {
isServerPaste = false;
destinationDataStore = (DestinationDataStore) owner;
CompoundCommand command = new CompoundCommand();
for (Object value: values) {
DestinationDataStoreEntryImpl entry = (DestinationDataStoreEntryImpl) value;
command.append(AddCommand.create(editingDomain, owner, RfcPackage.Literals.DESTINATION_DATA_STORE__DESTINATION_DATA, entry.getValue()));
}
return command;
}
return null;
}