| /******************************************************************************* |
| * Copyright 2011 Chair for Applied Software Engineering, |
| * Technische Universitaet Muenchen. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| ******************************************************************************/ |
| package org.eclipse.emf.emfstore.client.model.changeTracking.merging.conflict.conflicts; |
| |
| // BEGIN COMPLEX CODE |
| // |
| // WORK IN PROGRESS ! |
| // |
| |
| import java.util.List; |
| import java.util.Set; |
| |
| import org.eclipse.emf.emfstore.client.model.changeTracking.merging.DecisionManager; |
| import org.eclipse.emf.emfstore.client.model.changeTracking.merging.conflict.Conflict; |
| import org.eclipse.emf.emfstore.client.model.changeTracking.merging.conflict.ConflictDescription; |
| import org.eclipse.emf.emfstore.client.model.changeTracking.merging.conflict.ConflictOption; |
| import org.eclipse.emf.emfstore.client.model.changeTracking.merging.conflict.ConflictOption.OptionType; |
| import org.eclipse.emf.emfstore.client.model.changeTracking.merging.util.DecisionUtil; |
| import org.eclipse.emf.emfstore.server.model.versioning.operations.AbstractOperation; |
| |
| public class MultiAttributeSetSetConflict extends Conflict { |
| |
| public MultiAttributeSetSetConflict(Set<AbstractOperation> opsA, Set<AbstractOperation> opsB, |
| AbstractOperation leftOperation, AbstractOperation rightOperation, DecisionManager decisionManager) { |
| super(opsA, opsB, leftOperation, rightOperation, decisionManager); |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.emf.emfstore.client.ui.dialogs.merge.conflict.Conflict#initConflictDescription() |
| */ |
| @Override |
| protected ConflictDescription initConflictDescription(ConflictDescription description) { |
| |
| description.setDescription(DecisionUtil.getDescription("multiattributesetsetconflict", getDecisionManager() |
| .isBranchMerge())); |
| |
| return description; |
| } |
| |
| @Override |
| protected void initConflictOptions(List<ConflictOption> options) { |
| ConflictOption myOption = new ConflictOption("", OptionType.MyOperation); |
| myOption.addOperations(getMyOperations()); |
| ConflictOption theirOption = new ConflictOption("", OptionType.TheirOperation); |
| theirOption.addOperations(getTheirOperations()); |
| |
| myOption.setOptionLabel("Keep my element"); |
| theirOption.setOptionLabel("Keep their element"); |
| |
| options.add(myOption); |
| options.add(theirOption); |
| } |
| |
| } |