| /******************************************************************************* |
| * Copyright (c) 2012 Obeo. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Obeo - initial API and implementation |
| *******************************************************************************/ |
| package org.eclipse.emf.compare.uml2.rcp.ui.internal.accessor.factory; |
| |
| import org.eclipse.emf.common.notify.AdapterFactory; |
| import org.eclipse.emf.compare.rcp.ui.contentmergeviewer.accessor.legacy.ITypedElement; |
| import org.eclipse.emf.compare.rcp.ui.internal.contentmergeviewer.accessor.factory.impl.AbstractAccessorFactory; |
| import org.eclipse.emf.compare.rcp.ui.mergeviewer.IMergeViewer.MergeViewerSide; |
| import org.eclipse.emf.compare.uml2.internal.StereotypeApplicationChange; |
| import org.eclipse.emf.compare.uml2.rcp.ui.internal.accessor.UMLStereotypeApplicationChangeFeatureAccessor; |
| |
| /** |
| * This will be in charge of creating the accessor for stereotype changes. |
| * |
| * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a> |
| */ |
| public class UMLStereotypeApplicationChangeFeatureAccessorFactory extends AbstractAccessorFactory { |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.emf.compare.rcp.ui.contentmergeviewer.accessor.factory.ide.ui.internal.contentmergeviewer.accessor.IAccessorFactory#isFactoryFor(java.lang.Object) |
| */ |
| public boolean isFactoryFor(Object target) { |
| return target instanceof StereotypeApplicationChange; |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.emf.compare.rcp.ui.contentmergeviewer.accessor.factory.ide.ui.internal.contentmergeviewer.accessor.IAccessorFactory#createLeft(org.eclipse.emf.common.notify.AdapterFactory, |
| * java.lang.Object) |
| */ |
| public ITypedElement createLeft(AdapterFactory adapterFactory, Object target) { |
| return new UMLStereotypeApplicationChangeFeatureAccessor(adapterFactory, |
| (StereotypeApplicationChange)target, MergeViewerSide.LEFT); |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.emf.compare.rcp.ui.contentmergeviewer.accessor.factory.ide.ui.internal.contentmergeviewer.accessor.IAccessorFactory#createRight(org.eclipse.emf.common.notify.AdapterFactory, |
| * java.lang.Object) |
| */ |
| public ITypedElement createRight(AdapterFactory adapterFactory, Object target) { |
| return new UMLStereotypeApplicationChangeFeatureAccessor(adapterFactory, |
| (StereotypeApplicationChange)target, MergeViewerSide.RIGHT); |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.emf.compare.rcp.ui.contentmergeviewer.accessor.factory.ide.ui.internal.contentmergeviewer.accessor.IAccessorFactory#createAncestor(org.eclipse.emf.common.notify.AdapterFactory, |
| * java.lang.Object) |
| */ |
| public ITypedElement createAncestor(AdapterFactory adapterFactory, Object target) { |
| return new UMLStereotypeApplicationChangeFeatureAccessor(adapterFactory, |
| (StereotypeApplicationChange)target, MergeViewerSide.ANCESTOR); |
| } |
| } |