diff options
54 files changed, 0 insertions, 6075 deletions
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/.classpath b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/.classpath deleted file mode 100644 index 234a93f739d..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/.classpath +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry excluding="org/eclipse/papyrus/uml/merger/provider/MergeCommandProvider.java|org/eclipse/papyrus/uml/compare/merger/internal/old/merger/AttributeChangeLeftTargetTransactionalMerger.java|org/eclipse/papyrus/uml/compare/merger/internal/old/merger/AttributeChangeRightTargetTransactionalMerger.java|org/eclipse/papyrus/uml/compare/merger/internal/old/merger/AttributeOrderChangeTransactionalMerger.java|org/eclipse/papyrus/uml/compare/merger/internal/old/merger/DefaultExtensionTransactionalMerger.java|org/eclipse/papyrus/uml/compare/merger/internal/old/merger/DiffExtensionTransactionalMerger.java|org/eclipse/papyrus/uml/compare/merger/internal/old/merger/DiffGroupTransactionalMerger.java|org/eclipse/papyrus/uml/compare/merger/internal/old/merger/ModelElementChangeLeftTargetTransactionalMerger.java|org/eclipse/papyrus/uml/compare/merger/internal/old/merger/ModelElementChangeRightTargetTransactionalMerger.java|org/eclipse/papyrus/uml/compare/merger/internal/old/merger/MoveModelElementTransactionalMerger.java|org/eclipse/papyrus/uml/compare/merger/internal/old/merger/ReferenceChangeLeftTargetTransactionalMerger.java|org/eclipse/papyrus/uml/compare/merger/internal/old/merger/ReferenceChangeRightTargetTransactionalMerger.java|org/eclipse/papyrus/uml/compare/merger/internal/old/merger/ReferenceOrderChangeTransactionalMerger.java|org/eclipse/papyrus/uml/compare/merger/internal/old/merger/TransactionalDefaultMerger.java|org/eclipse/papyrus/uml/compare/merger/internal/old/merger/UpdateAttributeTransactionalMerger.java|org/eclipse/papyrus/uml/compare/merger/internal/old/merger/UpdateReferenceTransactionalMerger.java|org/eclipse/papyrus/uml/compare/diff/services/nested/UMLDiffService.java|org/eclipse/papyrus/uml/compare/diff/services/nested/UMLDiffEngine.java|org/eclipse/papyrus/uml/compare/diff/services/standalone/UMLStandaloneDiffEngine.java|org/eclipse/papyrus/uml/compare/diff/services/standalone/UMLStandaloneDiffService.java" kind="src" path="src"/>
- <classpathentry kind="src" path="src-gen"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/.project b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/.project deleted file mode 100644 index 8d9d62229d4..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/.project +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.uml.compare.diff</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.emf.facet.common.ProjectNature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/.settings/org.eclipse.jdt.core.prefs b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 44217f8c068..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,7 +0,0 @@ -eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/META-INF/MANIFEST.MF b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/META-INF/MANIFEST.MF deleted file mode 100644 index 5e84aaa7fe2..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/META-INF/MANIFEST.MF +++ /dev/null @@ -1,43 +0,0 @@ -Manifest-Version: 1.0
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.emf.compare.diff;bundle-version="1.3.1",
- org.eclipse.papyrus.infra.core.log;bundle-version="0.10.0",
- org.eclipse.emf.transaction,
- org.eclipse.gmf.runtime.emf.type.core,
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="0.10.0",
- org.eclipse.papyrus.infra.services.edit;bundle-version="0.10.0",
- org.eclipse.emf.compare;bundle-version="1.3.1",
- org.eclipse.papyrus.infra.tools;bundle-version="0.10.0",
- org.eclipse.papyrus.infra.core.sasheditor;bundle-version="0.10.0",
- com.google.guava,
- org.eclipse.papyrus.infra.emf;bundle-version="0.10.0",
- org.eclipse.emf.compare.match,
- org.eclipse.papyrus.infra.emf.compare.common;bundle-version="0.10.0",
- org.eclipse.papyrus.infra.emf.compare.diff;bundle-version="0.10.0",
- org.eclipse.uml2.uml,
- org.eclipse.emf.compare.diff.edit,
- org.eclipse.emf.facet.infra.query.core,
- org.eclipse.papyrus.infra.widgets.toolbox;bundle-version="0.10.0",
- org.eclipse.papyrus.infra.emf.compare.ui;bundle-version="0.10.0",
- org.eclipse.emf.facet.infra.browser.custom.core,
- org.eclipse.emf.compare.uml2;bundle-version="1.3.1"
-Export-Package: org.eclipse.papyrus.uml.compare.diff,
- org.eclipse.papyrus.uml.compare.diff.internal.merger,
- org.eclipse.papyrus.uml.compare.diff.services,
- org.eclipse.papyrus.uml.compare.diff.services.nested,
- org.eclipse.papyrus.uml.compare.diff.services.standalone,
- org.eclipse.papyrus.uml.compare.diff.uml_diff_extension,
- org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl,
- org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.util
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 0.10.0.qualifier
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.uml.compare.diff.Activator
-Bundle-SymbolicName: org.eclipse.papyrus.uml.compare.diff;singleton:=t
- rue
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/about.html b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/about.html deleted file mode 100644 index 82d49bf5f81..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/about.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/build.properties b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/build.properties deleted file mode 100644 index 2fe142429ae..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/build.properties +++ /dev/null @@ -1,10 +0,0 @@ -source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- plugin.pdoc,\
- build.properties,\
- about.html,\
- plugin.properties
-src.includes = about.html
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/model/papyrus_uml_diff_extension.ecore b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/model/papyrus_uml_diff_extension.ecore deleted file mode 100644 index 990417d6cbf..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/model/papyrus_uml_diff_extension.ecore +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="uml_diff_extension" nsURI="http://www.eclipse.org/papyrus/uml/compare/diff_ext/0.9"
- nsPrefix="uml_diff_extension">
- <eClassifiers xsi:type="ecore:EClass" name="GeneralizationTargetChangedExtension"
- eSuperTypes="#//UMLDiffExtension platform:/plugin/org.eclipse.emf.compare.diff/model/diff.ecore#//UpdateReference"/>
- <eClassifiers xsi:type="ecore:EClass" name="GeneralizationSourceChangedExtension"
- eSuperTypes="#//UMLDiffExtension platform:/plugin/org.eclipse.emf.compare.diff/model/diff.ecore#//MoveModelElement"/>
- <eClassifiers xsi:type="ecore:EClass" name="UMLDiffExtension" eSuperTypes="platform:/plugin/org.eclipse.emf.compare.diff/model/diff.ecore#//AbstractDiffExtension"/>
-</ecore:EPackage>
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/model/papyrus_uml_diff_extension.genmodel b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/model/papyrus_uml_diff_extension.genmodel deleted file mode 100644 index ace8fa8ded4..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/model/papyrus_uml_diff_extension.genmodel +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel"
- copyrightText="Copyright (c) 2012 CEA LIST.
 
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:
 Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation

"
- modelDirectory="/org.eclipse.papyrus.uml.compare.diff/src-gen" modelPluginID="org.eclipse.papyrus.uml.compare.diff"
- modelName="Papyrus_uml_diff_extension" importerID="org.eclipse.emf.importer.ecore"
- complianceLevel="5.0" copyrightFields="false" publicConstructors="true" usedGenPackages="platform:/plugin/org.eclipse.emf.compare.diff/model/diff.genmodel#//diff platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore platform:/plugin/org.eclipse.emf.compare.match/model/match.genmodel#//match">
- <foreignModel>papyrus_uml_diff_extension.ecore</foreignModel>
- <genPackages prefix="Uml_diff_extension" basePackage="org.eclipse.papyrus.uml.compare.diff"
- disposableProviderFactory="true" ecorePackage="papyrus_uml_diff_extension.ecore#/">
- <genClasses ecoreClass="papyrus_uml_diff_extension.ecore#//GeneralizationTargetChangedExtension"/>
- <genClasses ecoreClass="papyrus_uml_diff_extension.ecore#//GeneralizationSourceChangedExtension"/>
- <genClasses ecoreClass="papyrus_uml_diff_extension.ecore#//UMLDiffExtension"/>
- </genPackages>
-</genmodel:GenModel>
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/plugin.pdoc b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/plugin.pdoc deleted file mode 100644 index 955d3907f13..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/plugin.pdoc +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<doc:Documentation xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:doc="http://www.eclipse.org/papyrus/documentation/plugin/documentation" description="This plugin provides Transactional Merger for the Papyrus Compare Editors.">
- <referent firstName="vincent" lastName="lorenzo" eMail="vincent.lorenzo@cea.fr" currentCompany="CEA-LIST"/>
-</doc:Documentation>
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/plugin.properties b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/plugin.properties deleted file mode 100644 index d3cfd91de24..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/plugin.properties +++ /dev/null @@ -1,3 +0,0 @@ -#Properties file for org.eclipse.papyrus.uml.compare.diff
-providerName = Eclipse Modeling Project
-pluginName = Papyrus UML Merger (Incubation)
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/plugin.xml b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/plugin.xml deleted file mode 100644 index 8944ed30092..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/plugin.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.papyrus.infra.emf.compare.diff.mergerprovider">
- <mergerprovider
- fileExtension="uml"
- mergerProviderClass="org.eclipse.papyrus.uml.compare.diff.internal.provider.UMLTransactionalMergerProvider"
- priority="high">
- </mergerprovider>
- </extension>
- <extension
- point="org.eclipse.emf.facet.infra.query.registration">
- <modelqueryset
- file="resources/uml_compare_diff.querySet">
- </modelqueryset>
- </extension>
- <extension
- point="org.eclipse.emf.facet.infra.browser.custom.core.registration">
- <browserCustomization
- file="resources/uml_compare_diff.uiCustom"
- loadByDefault="true">
- </browserCustomization>
- </extension>
- <extension
- point="org.eclipse.emf.facet.infra.browser.custom.core.registration">
- <browserCustomization
- file="resources/uml_emf_compare_diff.uiCustom"
- loadByDefault="true">
- </browserCustomization>
- </extension>
- <extension
- point="org.eclipse.emf.ecore.generated_package">
- <package
- class="org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.Uml_diff_extensionPackageImpl"
- genModel="model/papyrus_uml_diff_extension.genmodel"
- uri="http://www.eclipse.org/papyrus/uml/compare/diff_ext/0.9">
- </package>
- </extension>
-
-</plugin>
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/resources/uml_compare_diff.querySet b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/resources/uml_compare_diff.querySet deleted file mode 100644 index 193139ef5cc..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/resources/uml_compare_diff.querySet +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?>
-<query:ModelQuerySet xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:query="http://www.eclipse.org/EmfFacet/infra/query/0.8.incubation" name="uml_compare_diff">
- <associatedMetamodels href="http://www.eclipse.org/emf/2002/Ecore#/"/>
- <queries xsi:type="query:JavaModelQuery" name="GetDiffElementLabel" description="This query returns the label for the element" implementationClassName="org.eclipse.papyrus.uml.compare.diff.queries.GetDiffElementLabel">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- </queries>
-</query:ModelQuerySet>
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/resources/uml_compare_diff.uiCustom b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/resources/uml_compare_diff.uiCustom deleted file mode 100644 index eeb8561d2cc..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/resources/uml_compare_diff.uiCustom +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?>
-<uicustom:MetamodelView xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:query="http://www.eclipse.org/EmfFacet/infra/query/0.8.incubation" xmlns:uicustom="http://www.eclipse.org/EmfFacet/infra/browser/custom/0.8" metamodelURI="http://www.eclipse.org/papyrus/uml/compare/diff_ext/0.9">
- <types metaclassName="uml_diff_extension.UMLDiffExtension">
- <customizedFeatures customizedFeature="label">
- <defaultValue xsi:type="uicustom:DerivedFeatureValue">
- <valueCalculator xsi:type="query:JavaModelQuery" href="emffacet:/query/uml_compare_diff#GetDiffElementLabel"/>
- </defaultValue>
- </customizedFeatures>
- <customizedFeatures customizedFeature="hideMetaclassName">
- <defaultValue xsi:type="uicustom:StaticFeatureValue" value="true"/>
- </customizedFeatures>
- </types>
-</uicustom:MetamodelView>
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/resources/uml_emf_compare_diff.uiCustom b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/resources/uml_emf_compare_diff.uiCustom deleted file mode 100644 index 31419544acb..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/resources/uml_emf_compare_diff.uiCustom +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?>
-<uicustom:MetamodelView xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:query="http://www.eclipse.org/EmfFacet/infra/query/0.8.incubation" xmlns:uicustom="http://www.eclipse.org/EmfFacet/infra/browser/custom/0.8" metamodelURI="http://www.eclipse.org/emf/compare/diff/uml2/1.0">
- <types metaclassName="uml2diff.UMLDiffExtension">
- <customizedFeatures customizedFeature="label">
- <defaultValue xsi:type="uicustom:DerivedFeatureValue">
- <valueCalculator xsi:type="query:JavaModelQuery" href="emffacet:/query/uml_compare_diff#GetDiffElementLabel"/>
- </defaultValue>
- </customizedFeatures>
- <customizedFeatures customizedFeature="hideMetaclassName">
- <defaultValue xsi:type="uicustom:StaticFeatureValue" value="true"/>
- </customizedFeatures>
- </types>
-</uicustom:MetamodelView>
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/GeneralizationSourceChangedExtension.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/GeneralizationSourceChangedExtension.java deleted file mode 100644 index b8147112f32..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/GeneralizationSourceChangedExtension.java +++ /dev/null @@ -1,29 +0,0 @@ -/**
- * Copyright (c) 2012 CEA LIST.
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *
- */
-package org.eclipse.papyrus.uml.compare.diff.uml_diff_extension;
-
-import org.eclipse.emf.compare.diff.metamodel.MoveModelElement;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Generalization Source Changed Extension</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.Uml_diff_extensionPackage#getGeneralizationSourceChangedExtension()
- * @model
- * @generated
- */
-public interface GeneralizationSourceChangedExtension extends UMLDiffExtension, MoveModelElement {
-} // GeneralizationSourceChangedExtension
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/GeneralizationTargetChangedExtension.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/GeneralizationTargetChangedExtension.java deleted file mode 100644 index e9c67424e2c..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/GeneralizationTargetChangedExtension.java +++ /dev/null @@ -1,29 +0,0 @@ -/**
- * Copyright (c) 2012 CEA LIST.
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *
- */
-package org.eclipse.papyrus.uml.compare.diff.uml_diff_extension;
-
-import org.eclipse.emf.compare.diff.metamodel.UpdateReference;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Generalization Target Changed Extension</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.Uml_diff_extensionPackage#getGeneralizationTargetChangedExtension()
- * @model
- * @generated
- */
-public interface GeneralizationTargetChangedExtension extends UMLDiffExtension, UpdateReference {
-} // GeneralizationTargetChangedExtension
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/UMLDiffExtension.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/UMLDiffExtension.java deleted file mode 100644 index a6c08e01802..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/UMLDiffExtension.java +++ /dev/null @@ -1,29 +0,0 @@ -/**
- * Copyright (c) 2012 CEA LIST.
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *
- */
-package org.eclipse.papyrus.uml.compare.diff.uml_diff_extension;
-
-import org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>UML Diff Extension</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.Uml_diff_extensionPackage#getUMLDiffExtension()
- * @model
- * @generated
- */
-public interface UMLDiffExtension extends AbstractDiffExtension {
-} // UMLDiffExtension
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/Uml_diff_extensionFactory.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/Uml_diff_extensionFactory.java deleted file mode 100644 index 31188d8a1e5..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/Uml_diff_extensionFactory.java +++ /dev/null @@ -1,71 +0,0 @@ -/**
- * Copyright (c) 2012 CEA LIST.
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *
- */
-package org.eclipse.papyrus.uml.compare.diff.uml_diff_extension;
-
-import org.eclipse.emf.ecore.EFactory;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Factory</b> for the model.
- * It provides a create method for each non-abstract class of the model.
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.Uml_diff_extensionPackage
- * @generated
- */
-public interface Uml_diff_extensionFactory extends EFactory {
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- Uml_diff_extensionFactory eINSTANCE = org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.Uml_diff_extensionFactoryImpl.init();
-
- /**
- * Returns a new object of class '<em>Generalization Target Changed Extension</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Generalization Target Changed Extension</em>'.
- * @generated
- */
- GeneralizationTargetChangedExtension createGeneralizationTargetChangedExtension();
-
- /**
- * Returns a new object of class '<em>Generalization Source Changed Extension</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Generalization Source Changed Extension</em>'.
- * @generated
- */
- GeneralizationSourceChangedExtension createGeneralizationSourceChangedExtension();
-
- /**
- * Returns a new object of class '<em>UML Diff Extension</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>UML Diff Extension</em>'.
- * @generated
- */
- UMLDiffExtension createUMLDiffExtension();
-
- /**
- * Returns the package supported by this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the package supported by this factory.
- * @generated
- */
- Uml_diff_extensionPackage getUml_diff_extensionPackage();
-
-} //Uml_diff_extensionFactory
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/Uml_diff_extensionPackage.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/Uml_diff_extensionPackage.java deleted file mode 100644 index 72e1eae231c..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/Uml_diff_extensionPackage.java +++ /dev/null @@ -1,472 +0,0 @@ -/**
- * Copyright (c) 2012 CEA LIST.
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *
- */
-package org.eclipse.papyrus.uml.compare.diff.uml_diff_extension;
-
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Package</b> for the model.
- * It contains accessors for the meta objects to represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.Uml_diff_extensionFactory
- * @model kind="package"
- * @generated
- */
-public interface Uml_diff_extensionPackage extends EPackage {
- /**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNAME = "uml_diff_extension";
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_URI = "http://www.eclipse.org/papyrus/uml/compare/diff_ext/0.9";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_PREFIX = "uml_diff_extension";
-
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- Uml_diff_extensionPackage eINSTANCE = org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.Uml_diff_extensionPackageImpl.init();
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.UMLDiffExtensionImpl <em>UML Diff Extension</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.UMLDiffExtensionImpl
- * @see org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.Uml_diff_extensionPackageImpl#getUMLDiffExtension()
- * @generated
- */
- int UML_DIFF_EXTENSION = 2;
-
- /**
- * The feature id for the '<em><b>Hide Elements</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UML_DIFF_EXTENSION__HIDE_ELEMENTS = DiffPackage.ABSTRACT_DIFF_EXTENSION__HIDE_ELEMENTS;
-
- /**
- * The feature id for the '<em><b>Is Collapsed</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UML_DIFF_EXTENSION__IS_COLLAPSED = DiffPackage.ABSTRACT_DIFF_EXTENSION__IS_COLLAPSED;
-
- /**
- * The number of structural features of the '<em>UML Diff Extension</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UML_DIFF_EXTENSION_FEATURE_COUNT = DiffPackage.ABSTRACT_DIFF_EXTENSION_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationTargetChangedExtensionImpl <em>Generalization Target Changed Extension</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationTargetChangedExtensionImpl
- * @see org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.Uml_diff_extensionPackageImpl#getGeneralizationTargetChangedExtension()
- * @generated
- */
- int GENERALIZATION_TARGET_CHANGED_EXTENSION = 0;
-
- /**
- * The feature id for the '<em><b>Hide Elements</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_TARGET_CHANGED_EXTENSION__HIDE_ELEMENTS = UML_DIFF_EXTENSION__HIDE_ELEMENTS;
-
- /**
- * The feature id for the '<em><b>Is Collapsed</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_TARGET_CHANGED_EXTENSION__IS_COLLAPSED = UML_DIFF_EXTENSION__IS_COLLAPSED;
-
- /**
- * The feature id for the '<em><b>Sub Diff Elements</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_TARGET_CHANGED_EXTENSION__SUB_DIFF_ELEMENTS = UML_DIFF_EXTENSION_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Is Hidden By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_TARGET_CHANGED_EXTENSION__IS_HIDDEN_BY = UML_DIFF_EXTENSION_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Conflicting</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_TARGET_CHANGED_EXTENSION__CONFLICTING = UML_DIFF_EXTENSION_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_TARGET_CHANGED_EXTENSION__KIND = UML_DIFF_EXTENSION_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Remote</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_TARGET_CHANGED_EXTENSION__REMOTE = UML_DIFF_EXTENSION_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Requires</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_TARGET_CHANGED_EXTENSION__REQUIRES = UML_DIFF_EXTENSION_FEATURE_COUNT + 5;
-
- /**
- * The feature id for the '<em><b>Required By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_TARGET_CHANGED_EXTENSION__REQUIRED_BY = UML_DIFF_EXTENSION_FEATURE_COUNT + 6;
-
- /**
- * The feature id for the '<em><b>Reference</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_TARGET_CHANGED_EXTENSION__REFERENCE = UML_DIFF_EXTENSION_FEATURE_COUNT + 7;
-
- /**
- * The feature id for the '<em><b>Right Element</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_TARGET_CHANGED_EXTENSION__RIGHT_ELEMENT = UML_DIFF_EXTENSION_FEATURE_COUNT + 8;
-
- /**
- * The feature id for the '<em><b>Left Element</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_TARGET_CHANGED_EXTENSION__LEFT_ELEMENT = UML_DIFF_EXTENSION_FEATURE_COUNT + 9;
-
- /**
- * The feature id for the '<em><b>Left Target</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_TARGET_CHANGED_EXTENSION__LEFT_TARGET = UML_DIFF_EXTENSION_FEATURE_COUNT + 10;
-
- /**
- * The feature id for the '<em><b>Right Target</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_TARGET_CHANGED_EXTENSION__RIGHT_TARGET = UML_DIFF_EXTENSION_FEATURE_COUNT + 11;
-
- /**
- * The number of structural features of the '<em>Generalization Target Changed Extension</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_TARGET_CHANGED_EXTENSION_FEATURE_COUNT = UML_DIFF_EXTENSION_FEATURE_COUNT + 12;
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationSourceChangedExtensionImpl <em>Generalization Source Changed Extension</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationSourceChangedExtensionImpl
- * @see org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.Uml_diff_extensionPackageImpl#getGeneralizationSourceChangedExtension()
- * @generated
- */
- int GENERALIZATION_SOURCE_CHANGED_EXTENSION = 1;
-
- /**
- * The feature id for the '<em><b>Hide Elements</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_SOURCE_CHANGED_EXTENSION__HIDE_ELEMENTS = UML_DIFF_EXTENSION__HIDE_ELEMENTS;
-
- /**
- * The feature id for the '<em><b>Is Collapsed</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_SOURCE_CHANGED_EXTENSION__IS_COLLAPSED = UML_DIFF_EXTENSION__IS_COLLAPSED;
-
- /**
- * The feature id for the '<em><b>Sub Diff Elements</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_SOURCE_CHANGED_EXTENSION__SUB_DIFF_ELEMENTS = UML_DIFF_EXTENSION_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Is Hidden By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_SOURCE_CHANGED_EXTENSION__IS_HIDDEN_BY = UML_DIFF_EXTENSION_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Conflicting</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_SOURCE_CHANGED_EXTENSION__CONFLICTING = UML_DIFF_EXTENSION_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_SOURCE_CHANGED_EXTENSION__KIND = UML_DIFF_EXTENSION_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Remote</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_SOURCE_CHANGED_EXTENSION__REMOTE = UML_DIFF_EXTENSION_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Requires</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_SOURCE_CHANGED_EXTENSION__REQUIRES = UML_DIFF_EXTENSION_FEATURE_COUNT + 5;
-
- /**
- * The feature id for the '<em><b>Required By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_SOURCE_CHANGED_EXTENSION__REQUIRED_BY = UML_DIFF_EXTENSION_FEATURE_COUNT + 6;
-
- /**
- * The feature id for the '<em><b>Right Element</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_SOURCE_CHANGED_EXTENSION__RIGHT_ELEMENT = UML_DIFF_EXTENSION_FEATURE_COUNT + 7;
-
- /**
- * The feature id for the '<em><b>Left Element</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_SOURCE_CHANGED_EXTENSION__LEFT_ELEMENT = UML_DIFF_EXTENSION_FEATURE_COUNT + 8;
-
- /**
- * The feature id for the '<em><b>Left Target</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_SOURCE_CHANGED_EXTENSION__LEFT_TARGET = UML_DIFF_EXTENSION_FEATURE_COUNT + 9;
-
- /**
- * The feature id for the '<em><b>Right Target</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_SOURCE_CHANGED_EXTENSION__RIGHT_TARGET = UML_DIFF_EXTENSION_FEATURE_COUNT + 10;
-
- /**
- * The number of structural features of the '<em>Generalization Source Changed Extension</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GENERALIZATION_SOURCE_CHANGED_EXTENSION_FEATURE_COUNT = UML_DIFF_EXTENSION_FEATURE_COUNT + 11;
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.GeneralizationTargetChangedExtension <em>Generalization Target Changed Extension</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Generalization Target Changed Extension</em>'.
- * @see org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.GeneralizationTargetChangedExtension
- * @generated
- */
- EClass getGeneralizationTargetChangedExtension();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.GeneralizationSourceChangedExtension <em>Generalization Source Changed Extension</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Generalization Source Changed Extension</em>'.
- * @see org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.GeneralizationSourceChangedExtension
- * @generated
- */
- EClass getGeneralizationSourceChangedExtension();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.UMLDiffExtension <em>UML Diff Extension</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>UML Diff Extension</em>'.
- * @see org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.UMLDiffExtension
- * @generated
- */
- EClass getUMLDiffExtension();
-
- /**
- * Returns the factory that creates the instances of the model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the factory that creates the instances of the model.
- * @generated
- */
- Uml_diff_extensionFactory getUml_diff_extensionFactory();
-
- /**
- * <!-- begin-user-doc -->
- * Defines literals for the meta objects that represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @generated
- */
- interface Literals {
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationTargetChangedExtensionImpl <em>Generalization Target Changed Extension</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationTargetChangedExtensionImpl
- * @see org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.Uml_diff_extensionPackageImpl#getGeneralizationTargetChangedExtension()
- * @generated
- */
- EClass GENERALIZATION_TARGET_CHANGED_EXTENSION = eINSTANCE.getGeneralizationTargetChangedExtension();
-
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationSourceChangedExtensionImpl <em>Generalization Source Changed Extension</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationSourceChangedExtensionImpl
- * @see org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.Uml_diff_extensionPackageImpl#getGeneralizationSourceChangedExtension()
- * @generated
- */
- EClass GENERALIZATION_SOURCE_CHANGED_EXTENSION = eINSTANCE.getGeneralizationSourceChangedExtension();
-
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.UMLDiffExtensionImpl <em>UML Diff Extension</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.UMLDiffExtensionImpl
- * @see org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.Uml_diff_extensionPackageImpl#getUMLDiffExtension()
- * @generated
- */
- EClass UML_DIFF_EXTENSION = eINSTANCE.getUMLDiffExtension();
-
- }
-
-} //Uml_diff_extensionPackage
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/impl/GeneralizationSourceChangedExtensionImpl.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/impl/GeneralizationSourceChangedExtensionImpl.java deleted file mode 100644 index 143f1aafd7a..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/impl/GeneralizationSourceChangedExtensionImpl.java +++ /dev/null @@ -1,762 +0,0 @@ -/**
- * Copyright (c) 2012 CEA LIST.
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *
- */
-package org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.diff.metamodel.DifferenceKind;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChange;
-import org.eclipse.emf.compare.diff.metamodel.MoveModelElement;
-import org.eclipse.emf.compare.diff.metamodel.UpdateModelElement;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-import org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.GeneralizationSourceChangedExtension;
-import org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.Uml_diff_extensionPackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Generalization Source Changed Extension</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationSourceChangedExtensionImpl#getSubDiffElements <em>Sub Diff Elements</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationSourceChangedExtensionImpl#getIsHiddenBy <em>Is Hidden By</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationSourceChangedExtensionImpl#isConflicting <em>Conflicting</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationSourceChangedExtensionImpl#getKind <em>Kind</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationSourceChangedExtensionImpl#isRemote <em>Remote</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationSourceChangedExtensionImpl#getRequires <em>Requires</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationSourceChangedExtensionImpl#getRequiredBy <em>Required By</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationSourceChangedExtensionImpl#getRightElement <em>Right Element</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationSourceChangedExtensionImpl#getLeftElement <em>Left Element</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationSourceChangedExtensionImpl#getLeftTarget <em>Left Target</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationSourceChangedExtensionImpl#getRightTarget <em>Right Target</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class GeneralizationSourceChangedExtensionImpl extends UMLDiffExtensionImpl implements GeneralizationSourceChangedExtension {
- /**
- * The cached value of the '{@link #getSubDiffElements() <em>Sub Diff Elements</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSubDiffElements()
- * @generated
- * @ordered
- */
- protected EList<DiffElement> subDiffElements;
-
- /**
- * The cached value of the '{@link #getIsHiddenBy() <em>Is Hidden By</em>}' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getIsHiddenBy()
- * @generated
- * @ordered
- */
- protected EList<AbstractDiffExtension> isHiddenBy;
-
- /**
- * The default value of the '{@link #isConflicting() <em>Conflicting</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isConflicting()
- * @generated
- * @ordered
- */
- protected static final boolean CONFLICTING_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isConflicting() <em>Conflicting</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isConflicting()
- * @generated
- * @ordered
- */
- protected boolean conflicting = CONFLICTING_EDEFAULT;
-
- /**
- * The default value of the '{@link #getKind() <em>Kind</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getKind()
- * @generated
- * @ordered
- */
- protected static final DifferenceKind KIND_EDEFAULT = DifferenceKind.ADDITION;
-
- /**
- * The cached value of the '{@link #getKind() <em>Kind</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getKind()
- * @generated
- * @ordered
- */
- protected DifferenceKind kind = KIND_EDEFAULT;
-
- /**
- * The default value of the '{@link #isRemote() <em>Remote</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isRemote()
- * @generated
- * @ordered
- */
- protected static final boolean REMOTE_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isRemote() <em>Remote</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isRemote()
- * @generated
- * @ordered
- */
- protected boolean remote = REMOTE_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getRequires() <em>Requires</em>}' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getRequires()
- * @generated
- * @ordered
- */
- protected EList<DiffElement> requires;
-
- /**
- * The cached value of the '{@link #getRequiredBy() <em>Required By</em>}' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getRequiredBy()
- * @generated
- * @ordered
- */
- protected EList<DiffElement> requiredBy;
-
- /**
- * The cached value of the '{@link #getRightElement() <em>Right Element</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getRightElement()
- * @generated
- * @ordered
- */
- protected EObject rightElement;
-
- /**
- * The cached value of the '{@link #getLeftElement() <em>Left Element</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getLeftElement()
- * @generated
- * @ordered
- */
- protected EObject leftElement;
-
- /**
- * The cached value of the '{@link #getLeftTarget() <em>Left Target</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getLeftTarget()
- * @generated
- * @ordered
- */
- protected EObject leftTarget;
-
- /**
- * The cached value of the '{@link #getRightTarget() <em>Right Target</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getRightTarget()
- * @generated
- * @ordered
- */
- protected EObject rightTarget;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public GeneralizationSourceChangedExtensionImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return Uml_diff_extensionPackage.Literals.GENERALIZATION_SOURCE_CHANGED_EXTENSION;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<DiffElement> getSubDiffElements() {
- if (subDiffElements == null) {
- subDiffElements = new EObjectContainmentEList<DiffElement>(DiffElement.class, this, Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__SUB_DIFF_ELEMENTS);
- }
- return subDiffElements;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<AbstractDiffExtension> getIsHiddenBy() {
- if (isHiddenBy == null) {
- isHiddenBy = new EObjectWithInverseResolvingEList.ManyInverse<AbstractDiffExtension>(AbstractDiffExtension.class, this, Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__IS_HIDDEN_BY, DiffPackage.ABSTRACT_DIFF_EXTENSION__HIDE_ELEMENTS);
- }
- return isHiddenBy;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isConflicting() {
- return conflicting;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public DifferenceKind getKind() {
- return kind;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isRemote() {
- return remote;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setRemote(boolean newRemote) {
- boolean oldRemote = remote;
- remote = newRemote;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__REMOTE, oldRemote, remote));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<DiffElement> getRequires() {
- if (requires == null) {
- requires = new EObjectWithInverseResolvingEList.ManyInverse<DiffElement>(DiffElement.class, this, Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__REQUIRES, DiffPackage.DIFF_ELEMENT__REQUIRED_BY);
- }
- return requires;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<DiffElement> getRequiredBy() {
- if (requiredBy == null) {
- requiredBy = new EObjectWithInverseResolvingEList.ManyInverse<DiffElement>(DiffElement.class, this, Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__REQUIRED_BY, DiffPackage.DIFF_ELEMENT__REQUIRES);
- }
- return requiredBy;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EObject getRightElement() {
- if (rightElement != null && rightElement.eIsProxy()) {
- InternalEObject oldRightElement = (InternalEObject)rightElement;
- rightElement = eResolveProxy(oldRightElement);
- if (rightElement != oldRightElement) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__RIGHT_ELEMENT, oldRightElement, rightElement));
- }
- }
- return rightElement;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetRightElement() {
- return rightElement;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setRightElement(EObject newRightElement) {
- EObject oldRightElement = rightElement;
- rightElement = newRightElement;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__RIGHT_ELEMENT, oldRightElement, rightElement));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EObject getLeftElement() {
- if (leftElement != null && leftElement.eIsProxy()) {
- InternalEObject oldLeftElement = (InternalEObject)leftElement;
- leftElement = eResolveProxy(oldLeftElement);
- if (leftElement != oldLeftElement) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__LEFT_ELEMENT, oldLeftElement, leftElement));
- }
- }
- return leftElement;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetLeftElement() {
- return leftElement;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setLeftElement(EObject newLeftElement) {
- EObject oldLeftElement = leftElement;
- leftElement = newLeftElement;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__LEFT_ELEMENT, oldLeftElement, leftElement));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EObject getLeftTarget() {
- if (leftTarget != null && leftTarget.eIsProxy()) {
- InternalEObject oldLeftTarget = (InternalEObject)leftTarget;
- leftTarget = eResolveProxy(oldLeftTarget);
- if (leftTarget != oldLeftTarget) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__LEFT_TARGET, oldLeftTarget, leftTarget));
- }
- }
- return leftTarget;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetLeftTarget() {
- return leftTarget;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setLeftTarget(EObject newLeftTarget) {
- EObject oldLeftTarget = leftTarget;
- leftTarget = newLeftTarget;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__LEFT_TARGET, oldLeftTarget, leftTarget));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EObject getRightTarget() {
- if (rightTarget != null && rightTarget.eIsProxy()) {
- InternalEObject oldRightTarget = (InternalEObject)rightTarget;
- rightTarget = eResolveProxy(oldRightTarget);
- if (rightTarget != oldRightTarget) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__RIGHT_TARGET, oldRightTarget, rightTarget));
- }
- }
- return rightTarget;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetRightTarget() {
- return rightTarget;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setRightTarget(EObject newRightTarget) {
- EObject oldRightTarget = rightTarget;
- rightTarget = newRightTarget;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__RIGHT_TARGET, oldRightTarget, rightTarget));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__IS_HIDDEN_BY:
- return ((InternalEList<InternalEObject>)(InternalEList<?>)getIsHiddenBy()).basicAdd(otherEnd, msgs);
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__REQUIRES:
- return ((InternalEList<InternalEObject>)(InternalEList<?>)getRequires()).basicAdd(otherEnd, msgs);
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__REQUIRED_BY:
- return ((InternalEList<InternalEObject>)(InternalEList<?>)getRequiredBy()).basicAdd(otherEnd, msgs);
- }
- return super.eInverseAdd(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__SUB_DIFF_ELEMENTS:
- return ((InternalEList<?>)getSubDiffElements()).basicRemove(otherEnd, msgs);
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__IS_HIDDEN_BY:
- return ((InternalEList<?>)getIsHiddenBy()).basicRemove(otherEnd, msgs);
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__REQUIRES:
- return ((InternalEList<?>)getRequires()).basicRemove(otherEnd, msgs);
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__REQUIRED_BY:
- return ((InternalEList<?>)getRequiredBy()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__SUB_DIFF_ELEMENTS:
- return getSubDiffElements();
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__IS_HIDDEN_BY:
- return getIsHiddenBy();
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__CONFLICTING:
- return isConflicting();
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__KIND:
- return getKind();
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__REMOTE:
- return isRemote();
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__REQUIRES:
- return getRequires();
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__REQUIRED_BY:
- return getRequiredBy();
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__RIGHT_ELEMENT:
- if (resolve) return getRightElement();
- return basicGetRightElement();
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__LEFT_ELEMENT:
- if (resolve) return getLeftElement();
- return basicGetLeftElement();
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__LEFT_TARGET:
- if (resolve) return getLeftTarget();
- return basicGetLeftTarget();
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__RIGHT_TARGET:
- if (resolve) return getRightTarget();
- return basicGetRightTarget();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__SUB_DIFF_ELEMENTS:
- getSubDiffElements().clear();
- getSubDiffElements().addAll((Collection<? extends DiffElement>)newValue);
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__IS_HIDDEN_BY:
- getIsHiddenBy().clear();
- getIsHiddenBy().addAll((Collection<? extends AbstractDiffExtension>)newValue);
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__REMOTE:
- setRemote((Boolean)newValue);
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__REQUIRES:
- getRequires().clear();
- getRequires().addAll((Collection<? extends DiffElement>)newValue);
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__REQUIRED_BY:
- getRequiredBy().clear();
- getRequiredBy().addAll((Collection<? extends DiffElement>)newValue);
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__RIGHT_ELEMENT:
- setRightElement((EObject)newValue);
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__LEFT_ELEMENT:
- setLeftElement((EObject)newValue);
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__LEFT_TARGET:
- setLeftTarget((EObject)newValue);
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__RIGHT_TARGET:
- setRightTarget((EObject)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__SUB_DIFF_ELEMENTS:
- getSubDiffElements().clear();
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__IS_HIDDEN_BY:
- getIsHiddenBy().clear();
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__REMOTE:
- setRemote(REMOTE_EDEFAULT);
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__REQUIRES:
- getRequires().clear();
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__REQUIRED_BY:
- getRequiredBy().clear();
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__RIGHT_ELEMENT:
- setRightElement((EObject)null);
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__LEFT_ELEMENT:
- setLeftElement((EObject)null);
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__LEFT_TARGET:
- setLeftTarget((EObject)null);
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__RIGHT_TARGET:
- setRightTarget((EObject)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__SUB_DIFF_ELEMENTS:
- return subDiffElements != null && !subDiffElements.isEmpty();
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__IS_HIDDEN_BY:
- return isHiddenBy != null && !isHiddenBy.isEmpty();
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__CONFLICTING:
- return conflicting != CONFLICTING_EDEFAULT;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__KIND:
- return kind != KIND_EDEFAULT;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__REMOTE:
- return remote != REMOTE_EDEFAULT;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__REQUIRES:
- return requires != null && !requires.isEmpty();
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__REQUIRED_BY:
- return requiredBy != null && !requiredBy.isEmpty();
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__RIGHT_ELEMENT:
- return rightElement != null;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__LEFT_ELEMENT:
- return leftElement != null;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__LEFT_TARGET:
- return leftTarget != null;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__RIGHT_TARGET:
- return rightTarget != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == DiffElement.class) {
- switch (derivedFeatureID) {
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__SUB_DIFF_ELEMENTS: return DiffPackage.DIFF_ELEMENT__SUB_DIFF_ELEMENTS;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__IS_HIDDEN_BY: return DiffPackage.DIFF_ELEMENT__IS_HIDDEN_BY;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__CONFLICTING: return DiffPackage.DIFF_ELEMENT__CONFLICTING;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__KIND: return DiffPackage.DIFF_ELEMENT__KIND;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__REMOTE: return DiffPackage.DIFF_ELEMENT__REMOTE;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__REQUIRES: return DiffPackage.DIFF_ELEMENT__REQUIRES;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__REQUIRED_BY: return DiffPackage.DIFF_ELEMENT__REQUIRED_BY;
- default: return -1;
- }
- }
- if (baseClass == ModelElementChange.class) {
- switch (derivedFeatureID) {
- default: return -1;
- }
- }
- if (baseClass == UpdateModelElement.class) {
- switch (derivedFeatureID) {
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__RIGHT_ELEMENT: return DiffPackage.UPDATE_MODEL_ELEMENT__RIGHT_ELEMENT;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__LEFT_ELEMENT: return DiffPackage.UPDATE_MODEL_ELEMENT__LEFT_ELEMENT;
- default: return -1;
- }
- }
- if (baseClass == MoveModelElement.class) {
- switch (derivedFeatureID) {
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__LEFT_TARGET: return DiffPackage.MOVE_MODEL_ELEMENT__LEFT_TARGET;
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__RIGHT_TARGET: return DiffPackage.MOVE_MODEL_ELEMENT__RIGHT_TARGET;
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == DiffElement.class) {
- switch (baseFeatureID) {
- case DiffPackage.DIFF_ELEMENT__SUB_DIFF_ELEMENTS: return Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__SUB_DIFF_ELEMENTS;
- case DiffPackage.DIFF_ELEMENT__IS_HIDDEN_BY: return Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__IS_HIDDEN_BY;
- case DiffPackage.DIFF_ELEMENT__CONFLICTING: return Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__CONFLICTING;
- case DiffPackage.DIFF_ELEMENT__KIND: return Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__KIND;
- case DiffPackage.DIFF_ELEMENT__REMOTE: return Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__REMOTE;
- case DiffPackage.DIFF_ELEMENT__REQUIRES: return Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__REQUIRES;
- case DiffPackage.DIFF_ELEMENT__REQUIRED_BY: return Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__REQUIRED_BY;
- default: return -1;
- }
- }
- if (baseClass == ModelElementChange.class) {
- switch (baseFeatureID) {
- default: return -1;
- }
- }
- if (baseClass == UpdateModelElement.class) {
- switch (baseFeatureID) {
- case DiffPackage.UPDATE_MODEL_ELEMENT__RIGHT_ELEMENT: return Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__RIGHT_ELEMENT;
- case DiffPackage.UPDATE_MODEL_ELEMENT__LEFT_ELEMENT: return Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__LEFT_ELEMENT;
- default: return -1;
- }
- }
- if (baseClass == MoveModelElement.class) {
- switch (baseFeatureID) {
- case DiffPackage.MOVE_MODEL_ELEMENT__LEFT_TARGET: return Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__LEFT_TARGET;
- case DiffPackage.MOVE_MODEL_ELEMENT__RIGHT_TARGET: return Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION__RIGHT_TARGET;
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (conflicting: ");
- result.append(conflicting);
- result.append(", kind: ");
- result.append(kind);
- result.append(", remote: ");
- result.append(remote);
- result.append(')');
- return result.toString();
- }
-
-} //GeneralizationSourceChangedExtensionImpl
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/impl/GeneralizationTargetChangedExtensionImpl.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/impl/GeneralizationTargetChangedExtensionImpl.java deleted file mode 100644 index cf6c090c187..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/impl/GeneralizationTargetChangedExtensionImpl.java +++ /dev/null @@ -1,814 +0,0 @@ -/**
- * Copyright (c) 2012 CEA LIST.
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *
- */
-package org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.diff.metamodel.DifferenceKind;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChange;
-import org.eclipse.emf.compare.diff.metamodel.UpdateReference;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-import org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.GeneralizationTargetChangedExtension;
-import org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.Uml_diff_extensionPackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Generalization Target Changed Extension</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationTargetChangedExtensionImpl#getSubDiffElements <em>Sub Diff Elements</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationTargetChangedExtensionImpl#getIsHiddenBy <em>Is Hidden By</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationTargetChangedExtensionImpl#isConflicting <em>Conflicting</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationTargetChangedExtensionImpl#getKind <em>Kind</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationTargetChangedExtensionImpl#isRemote <em>Remote</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationTargetChangedExtensionImpl#getRequires <em>Requires</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationTargetChangedExtensionImpl#getRequiredBy <em>Required By</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationTargetChangedExtensionImpl#getReference <em>Reference</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationTargetChangedExtensionImpl#getRightElement <em>Right Element</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationTargetChangedExtensionImpl#getLeftElement <em>Left Element</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationTargetChangedExtensionImpl#getLeftTarget <em>Left Target</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationTargetChangedExtensionImpl#getRightTarget <em>Right Target</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class GeneralizationTargetChangedExtensionImpl extends UMLDiffExtensionImpl implements GeneralizationTargetChangedExtension {
- /**
- * The cached value of the '{@link #getSubDiffElements() <em>Sub Diff Elements</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSubDiffElements()
- * @generated
- * @ordered
- */
- protected EList<DiffElement> subDiffElements;
-
- /**
- * The cached value of the '{@link #getIsHiddenBy() <em>Is Hidden By</em>}' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getIsHiddenBy()
- * @generated
- * @ordered
- */
- protected EList<AbstractDiffExtension> isHiddenBy;
-
- /**
- * The default value of the '{@link #isConflicting() <em>Conflicting</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isConflicting()
- * @generated
- * @ordered
- */
- protected static final boolean CONFLICTING_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isConflicting() <em>Conflicting</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isConflicting()
- * @generated
- * @ordered
- */
- protected boolean conflicting = CONFLICTING_EDEFAULT;
-
- /**
- * The default value of the '{@link #getKind() <em>Kind</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getKind()
- * @generated
- * @ordered
- */
- protected static final DifferenceKind KIND_EDEFAULT = DifferenceKind.ADDITION;
-
- /**
- * The cached value of the '{@link #getKind() <em>Kind</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getKind()
- * @generated
- * @ordered
- */
- protected DifferenceKind kind = KIND_EDEFAULT;
-
- /**
- * The default value of the '{@link #isRemote() <em>Remote</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isRemote()
- * @generated
- * @ordered
- */
- protected static final boolean REMOTE_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isRemote() <em>Remote</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isRemote()
- * @generated
- * @ordered
- */
- protected boolean remote = REMOTE_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getRequires() <em>Requires</em>}' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getRequires()
- * @generated
- * @ordered
- */
- protected EList<DiffElement> requires;
-
- /**
- * The cached value of the '{@link #getRequiredBy() <em>Required By</em>}' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getRequiredBy()
- * @generated
- * @ordered
- */
- protected EList<DiffElement> requiredBy;
-
- /**
- * The cached value of the '{@link #getReference() <em>Reference</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getReference()
- * @generated
- * @ordered
- */
- protected EReference reference;
-
- /**
- * The cached value of the '{@link #getRightElement() <em>Right Element</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getRightElement()
- * @generated
- * @ordered
- */
- protected EObject rightElement;
-
- /**
- * The cached value of the '{@link #getLeftElement() <em>Left Element</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getLeftElement()
- * @generated
- * @ordered
- */
- protected EObject leftElement;
-
- /**
- * The cached value of the '{@link #getLeftTarget() <em>Left Target</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getLeftTarget()
- * @generated
- * @ordered
- */
- protected EObject leftTarget;
-
- /**
- * The cached value of the '{@link #getRightTarget() <em>Right Target</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getRightTarget()
- * @generated
- * @ordered
- */
- protected EObject rightTarget;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public GeneralizationTargetChangedExtensionImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return Uml_diff_extensionPackage.Literals.GENERALIZATION_TARGET_CHANGED_EXTENSION;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<DiffElement> getSubDiffElements() {
- if (subDiffElements == null) {
- subDiffElements = new EObjectContainmentEList<DiffElement>(DiffElement.class, this, Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__SUB_DIFF_ELEMENTS);
- }
- return subDiffElements;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<AbstractDiffExtension> getIsHiddenBy() {
- if (isHiddenBy == null) {
- isHiddenBy = new EObjectWithInverseResolvingEList.ManyInverse<AbstractDiffExtension>(AbstractDiffExtension.class, this, Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__IS_HIDDEN_BY, DiffPackage.ABSTRACT_DIFF_EXTENSION__HIDE_ELEMENTS);
- }
- return isHiddenBy;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isConflicting() {
- return conflicting;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public DifferenceKind getKind() {
- return kind;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isRemote() {
- return remote;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setRemote(boolean newRemote) {
- boolean oldRemote = remote;
- remote = newRemote;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REMOTE, oldRemote, remote));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<DiffElement> getRequires() {
- if (requires == null) {
- requires = new EObjectWithInverseResolvingEList.ManyInverse<DiffElement>(DiffElement.class, this, Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REQUIRES, DiffPackage.DIFF_ELEMENT__REQUIRED_BY);
- }
- return requires;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<DiffElement> getRequiredBy() {
- if (requiredBy == null) {
- requiredBy = new EObjectWithInverseResolvingEList.ManyInverse<DiffElement>(DiffElement.class, this, Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REQUIRED_BY, DiffPackage.DIFF_ELEMENT__REQUIRES);
- }
- return requiredBy;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getReference() {
- if (reference != null && reference.eIsProxy()) {
- InternalEObject oldReference = (InternalEObject)reference;
- reference = (EReference)eResolveProxy(oldReference);
- if (reference != oldReference) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REFERENCE, oldReference, reference));
- }
- }
- return reference;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference basicGetReference() {
- return reference;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setReference(EReference newReference) {
- EReference oldReference = reference;
- reference = newReference;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REFERENCE, oldReference, reference));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EObject getRightElement() {
- if (rightElement != null && rightElement.eIsProxy()) {
- InternalEObject oldRightElement = (InternalEObject)rightElement;
- rightElement = eResolveProxy(oldRightElement);
- if (rightElement != oldRightElement) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__RIGHT_ELEMENT, oldRightElement, rightElement));
- }
- }
- return rightElement;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetRightElement() {
- return rightElement;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setRightElement(EObject newRightElement) {
- EObject oldRightElement = rightElement;
- rightElement = newRightElement;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__RIGHT_ELEMENT, oldRightElement, rightElement));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EObject getLeftElement() {
- if (leftElement != null && leftElement.eIsProxy()) {
- InternalEObject oldLeftElement = (InternalEObject)leftElement;
- leftElement = eResolveProxy(oldLeftElement);
- if (leftElement != oldLeftElement) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__LEFT_ELEMENT, oldLeftElement, leftElement));
- }
- }
- return leftElement;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetLeftElement() {
- return leftElement;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setLeftElement(EObject newLeftElement) {
- EObject oldLeftElement = leftElement;
- leftElement = newLeftElement;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__LEFT_ELEMENT, oldLeftElement, leftElement));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EObject getLeftTarget() {
- if (leftTarget != null && leftTarget.eIsProxy()) {
- InternalEObject oldLeftTarget = (InternalEObject)leftTarget;
- leftTarget = eResolveProxy(oldLeftTarget);
- if (leftTarget != oldLeftTarget) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__LEFT_TARGET, oldLeftTarget, leftTarget));
- }
- }
- return leftTarget;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetLeftTarget() {
- return leftTarget;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setLeftTarget(EObject newLeftTarget) {
- EObject oldLeftTarget = leftTarget;
- leftTarget = newLeftTarget;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__LEFT_TARGET, oldLeftTarget, leftTarget));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EObject getRightTarget() {
- if (rightTarget != null && rightTarget.eIsProxy()) {
- InternalEObject oldRightTarget = (InternalEObject)rightTarget;
- rightTarget = eResolveProxy(oldRightTarget);
- if (rightTarget != oldRightTarget) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__RIGHT_TARGET, oldRightTarget, rightTarget));
- }
- }
- return rightTarget;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetRightTarget() {
- return rightTarget;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setRightTarget(EObject newRightTarget) {
- EObject oldRightTarget = rightTarget;
- rightTarget = newRightTarget;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__RIGHT_TARGET, oldRightTarget, rightTarget));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__IS_HIDDEN_BY:
- return ((InternalEList<InternalEObject>)(InternalEList<?>)getIsHiddenBy()).basicAdd(otherEnd, msgs);
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REQUIRES:
- return ((InternalEList<InternalEObject>)(InternalEList<?>)getRequires()).basicAdd(otherEnd, msgs);
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REQUIRED_BY:
- return ((InternalEList<InternalEObject>)(InternalEList<?>)getRequiredBy()).basicAdd(otherEnd, msgs);
- }
- return super.eInverseAdd(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__SUB_DIFF_ELEMENTS:
- return ((InternalEList<?>)getSubDiffElements()).basicRemove(otherEnd, msgs);
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__IS_HIDDEN_BY:
- return ((InternalEList<?>)getIsHiddenBy()).basicRemove(otherEnd, msgs);
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REQUIRES:
- return ((InternalEList<?>)getRequires()).basicRemove(otherEnd, msgs);
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REQUIRED_BY:
- return ((InternalEList<?>)getRequiredBy()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__SUB_DIFF_ELEMENTS:
- return getSubDiffElements();
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__IS_HIDDEN_BY:
- return getIsHiddenBy();
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__CONFLICTING:
- return isConflicting();
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__KIND:
- return getKind();
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REMOTE:
- return isRemote();
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REQUIRES:
- return getRequires();
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REQUIRED_BY:
- return getRequiredBy();
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REFERENCE:
- if (resolve) return getReference();
- return basicGetReference();
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__RIGHT_ELEMENT:
- if (resolve) return getRightElement();
- return basicGetRightElement();
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__LEFT_ELEMENT:
- if (resolve) return getLeftElement();
- return basicGetLeftElement();
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__LEFT_TARGET:
- if (resolve) return getLeftTarget();
- return basicGetLeftTarget();
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__RIGHT_TARGET:
- if (resolve) return getRightTarget();
- return basicGetRightTarget();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__SUB_DIFF_ELEMENTS:
- getSubDiffElements().clear();
- getSubDiffElements().addAll((Collection<? extends DiffElement>)newValue);
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__IS_HIDDEN_BY:
- getIsHiddenBy().clear();
- getIsHiddenBy().addAll((Collection<? extends AbstractDiffExtension>)newValue);
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REMOTE:
- setRemote((Boolean)newValue);
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REQUIRES:
- getRequires().clear();
- getRequires().addAll((Collection<? extends DiffElement>)newValue);
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REQUIRED_BY:
- getRequiredBy().clear();
- getRequiredBy().addAll((Collection<? extends DiffElement>)newValue);
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REFERENCE:
- setReference((EReference)newValue);
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__RIGHT_ELEMENT:
- setRightElement((EObject)newValue);
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__LEFT_ELEMENT:
- setLeftElement((EObject)newValue);
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__LEFT_TARGET:
- setLeftTarget((EObject)newValue);
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__RIGHT_TARGET:
- setRightTarget((EObject)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__SUB_DIFF_ELEMENTS:
- getSubDiffElements().clear();
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__IS_HIDDEN_BY:
- getIsHiddenBy().clear();
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REMOTE:
- setRemote(REMOTE_EDEFAULT);
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REQUIRES:
- getRequires().clear();
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REQUIRED_BY:
- getRequiredBy().clear();
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REFERENCE:
- setReference((EReference)null);
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__RIGHT_ELEMENT:
- setRightElement((EObject)null);
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__LEFT_ELEMENT:
- setLeftElement((EObject)null);
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__LEFT_TARGET:
- setLeftTarget((EObject)null);
- return;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__RIGHT_TARGET:
- setRightTarget((EObject)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__SUB_DIFF_ELEMENTS:
- return subDiffElements != null && !subDiffElements.isEmpty();
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__IS_HIDDEN_BY:
- return isHiddenBy != null && !isHiddenBy.isEmpty();
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__CONFLICTING:
- return conflicting != CONFLICTING_EDEFAULT;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__KIND:
- return kind != KIND_EDEFAULT;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REMOTE:
- return remote != REMOTE_EDEFAULT;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REQUIRES:
- return requires != null && !requires.isEmpty();
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REQUIRED_BY:
- return requiredBy != null && !requiredBy.isEmpty();
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REFERENCE:
- return reference != null;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__RIGHT_ELEMENT:
- return rightElement != null;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__LEFT_ELEMENT:
- return leftElement != null;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__LEFT_TARGET:
- return leftTarget != null;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__RIGHT_TARGET:
- return rightTarget != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
- if (baseClass == DiffElement.class) {
- switch (derivedFeatureID) {
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__SUB_DIFF_ELEMENTS: return DiffPackage.DIFF_ELEMENT__SUB_DIFF_ELEMENTS;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__IS_HIDDEN_BY: return DiffPackage.DIFF_ELEMENT__IS_HIDDEN_BY;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__CONFLICTING: return DiffPackage.DIFF_ELEMENT__CONFLICTING;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__KIND: return DiffPackage.DIFF_ELEMENT__KIND;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REMOTE: return DiffPackage.DIFF_ELEMENT__REMOTE;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REQUIRES: return DiffPackage.DIFF_ELEMENT__REQUIRES;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REQUIRED_BY: return DiffPackage.DIFF_ELEMENT__REQUIRED_BY;
- default: return -1;
- }
- }
- if (baseClass == ReferenceChange.class) {
- switch (derivedFeatureID) {
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REFERENCE: return DiffPackage.REFERENCE_CHANGE__REFERENCE;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__RIGHT_ELEMENT: return DiffPackage.REFERENCE_CHANGE__RIGHT_ELEMENT;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__LEFT_ELEMENT: return DiffPackage.REFERENCE_CHANGE__LEFT_ELEMENT;
- default: return -1;
- }
- }
- if (baseClass == UpdateReference.class) {
- switch (derivedFeatureID) {
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__LEFT_TARGET: return DiffPackage.UPDATE_REFERENCE__LEFT_TARGET;
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__RIGHT_TARGET: return DiffPackage.UPDATE_REFERENCE__RIGHT_TARGET;
- default: return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
- if (baseClass == DiffElement.class) {
- switch (baseFeatureID) {
- case DiffPackage.DIFF_ELEMENT__SUB_DIFF_ELEMENTS: return Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__SUB_DIFF_ELEMENTS;
- case DiffPackage.DIFF_ELEMENT__IS_HIDDEN_BY: return Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__IS_HIDDEN_BY;
- case DiffPackage.DIFF_ELEMENT__CONFLICTING: return Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__CONFLICTING;
- case DiffPackage.DIFF_ELEMENT__KIND: return Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__KIND;
- case DiffPackage.DIFF_ELEMENT__REMOTE: return Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REMOTE;
- case DiffPackage.DIFF_ELEMENT__REQUIRES: return Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REQUIRES;
- case DiffPackage.DIFF_ELEMENT__REQUIRED_BY: return Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REQUIRED_BY;
- default: return -1;
- }
- }
- if (baseClass == ReferenceChange.class) {
- switch (baseFeatureID) {
- case DiffPackage.REFERENCE_CHANGE__REFERENCE: return Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__REFERENCE;
- case DiffPackage.REFERENCE_CHANGE__RIGHT_ELEMENT: return Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__RIGHT_ELEMENT;
- case DiffPackage.REFERENCE_CHANGE__LEFT_ELEMENT: return Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__LEFT_ELEMENT;
- default: return -1;
- }
- }
- if (baseClass == UpdateReference.class) {
- switch (baseFeatureID) {
- case DiffPackage.UPDATE_REFERENCE__LEFT_TARGET: return Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__LEFT_TARGET;
- case DiffPackage.UPDATE_REFERENCE__RIGHT_TARGET: return Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION__RIGHT_TARGET;
- default: return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (conflicting: ");
- result.append(conflicting);
- result.append(", kind: ");
- result.append(kind);
- result.append(", remote: ");
- result.append(remote);
- result.append(')');
- return result.toString();
- }
-
-} //GeneralizationTargetChangedExtensionImpl
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/impl/UMLDiffExtensionImpl.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/impl/UMLDiffExtensionImpl.java deleted file mode 100644 index 9e169a72a5d..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/impl/UMLDiffExtensionImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -/**
- * Copyright (c) 2012 CEA LIST.
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *
- */
-package org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl;
-
-import org.eclipse.emf.compare.diff.metamodel.impl.AbstractDiffExtensionImpl;
-
-import org.eclipse.emf.ecore.EClass;
-
-import org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.UMLDiffExtension;
-import org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.Uml_diff_extensionPackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>UML Diff Extension</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * </p>
- *
- * @generated
- */
-public class UMLDiffExtensionImpl extends AbstractDiffExtensionImpl implements UMLDiffExtension {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public UMLDiffExtensionImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return Uml_diff_extensionPackage.Literals.UML_DIFF_EXTENSION;
- }
-
-} //UMLDiffExtensionImpl
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/impl/Uml_diff_extensionFactoryImpl.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/impl/Uml_diff_extensionFactoryImpl.java deleted file mode 100644 index bbe1d4e770f..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/impl/Uml_diff_extensionFactoryImpl.java +++ /dev/null @@ -1,128 +0,0 @@ -/**
- * Copyright (c) 2012 CEA LIST.
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *
- */
-package org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-
-import org.eclipse.emf.ecore.impl.EFactoryImpl;
-
-import org.eclipse.emf.ecore.plugin.EcorePlugin;
-
-import org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.*;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Factory</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class Uml_diff_extensionFactoryImpl extends EFactoryImpl implements Uml_diff_extensionFactory {
- /**
- * Creates the default factory implementation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static Uml_diff_extensionFactory init() {
- try {
- Uml_diff_extensionFactory theUml_diff_extensionFactory = (Uml_diff_extensionFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/papyrus/uml/compare/diff_ext/0.9");
- if (theUml_diff_extensionFactory != null) {
- return theUml_diff_extensionFactory;
- }
- }
- catch (Exception exception) {
- EcorePlugin.INSTANCE.log(exception);
- }
- return new Uml_diff_extensionFactoryImpl();
- }
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Uml_diff_extensionFactoryImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EObject create(EClass eClass) {
- switch (eClass.getClassifierID()) {
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION: return createGeneralizationTargetChangedExtension();
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION: return createGeneralizationSourceChangedExtension();
- case Uml_diff_extensionPackage.UML_DIFF_EXTENSION: return createUMLDiffExtension();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public GeneralizationTargetChangedExtension createGeneralizationTargetChangedExtension() {
- GeneralizationTargetChangedExtensionImpl generalizationTargetChangedExtension = new GeneralizationTargetChangedExtensionImpl();
- return generalizationTargetChangedExtension;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public GeneralizationSourceChangedExtension createGeneralizationSourceChangedExtension() {
- GeneralizationSourceChangedExtensionImpl generalizationSourceChangedExtension = new GeneralizationSourceChangedExtensionImpl();
- return generalizationSourceChangedExtension;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public UMLDiffExtension createUMLDiffExtension() {
- UMLDiffExtensionImpl umlDiffExtension = new UMLDiffExtensionImpl();
- return umlDiffExtension;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Uml_diff_extensionPackage getUml_diff_extensionPackage() {
- return (Uml_diff_extensionPackage)getEPackage();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @deprecated
- * @generated
- */
- @Deprecated
- public static Uml_diff_extensionPackage getPackage() {
- return Uml_diff_extensionPackage.eINSTANCE;
- }
-
-} //Uml_diff_extensionFactoryImpl
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/impl/Uml_diff_extensionPackageImpl.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/impl/Uml_diff_extensionPackageImpl.java deleted file mode 100644 index df1447027ae..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/impl/Uml_diff_extensionPackageImpl.java +++ /dev/null @@ -1,231 +0,0 @@ -/**
- * Copyright (c) 2012 CEA LIST.
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *
- */
-package org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl;
-
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-
-import org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.GeneralizationSourceChangedExtension;
-import org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.GeneralizationTargetChangedExtension;
-import org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.UMLDiffExtension;
-import org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.Uml_diff_extensionFactory;
-import org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.Uml_diff_extensionPackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Package</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class Uml_diff_extensionPackageImpl extends EPackageImpl implements Uml_diff_extensionPackage {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass generalizationTargetChangedExtensionEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass generalizationSourceChangedExtensionEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass umlDiffExtensionEClass = null;
-
- /**
- * Creates an instance of the model <b>Package</b>, registered with
- * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
- * package URI value.
- * <p>Note: the correct way to create the package is via the static
- * factory method {@link #init init()}, which also performs
- * initialization of the package, or returns the registered package,
- * if one already exists.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.ecore.EPackage.Registry
- * @see org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.Uml_diff_extensionPackage#eNS_URI
- * @see #init()
- * @generated
- */
- private Uml_diff_extensionPackageImpl() {
- super(eNS_URI, Uml_diff_extensionFactory.eINSTANCE);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static boolean isInited = false;
-
- /**
- * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
- *
- * <p>This method is used to initialize {@link Uml_diff_extensionPackage#eINSTANCE} when that field is accessed.
- * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #eNS_URI
- * @see #createPackageContents()
- * @see #initializePackageContents()
- * @generated
- */
- public static Uml_diff_extensionPackage init() {
- if (isInited) return (Uml_diff_extensionPackage)EPackage.Registry.INSTANCE.getEPackage(Uml_diff_extensionPackage.eNS_URI);
-
- // Obtain or create and register package
- Uml_diff_extensionPackageImpl theUml_diff_extensionPackage = (Uml_diff_extensionPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof Uml_diff_extensionPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new Uml_diff_extensionPackageImpl());
-
- isInited = true;
-
- // Initialize simple dependencies
- DiffPackage.eINSTANCE.eClass();
-
- // Create package meta-data objects
- theUml_diff_extensionPackage.createPackageContents();
-
- // Initialize created meta-data
- theUml_diff_extensionPackage.initializePackageContents();
-
- // Mark meta-data to indicate it can't be changed
- theUml_diff_extensionPackage.freeze();
-
-
- // Update the registry and return the package
- EPackage.Registry.INSTANCE.put(Uml_diff_extensionPackage.eNS_URI, theUml_diff_extensionPackage);
- return theUml_diff_extensionPackage;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getGeneralizationTargetChangedExtension() {
- return generalizationTargetChangedExtensionEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getGeneralizationSourceChangedExtension() {
- return generalizationSourceChangedExtensionEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getUMLDiffExtension() {
- return umlDiffExtensionEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Uml_diff_extensionFactory getUml_diff_extensionFactory() {
- return (Uml_diff_extensionFactory)getEFactoryInstance();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isCreated = false;
-
- /**
- * Creates the meta-model objects for the package. This method is
- * guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void createPackageContents() {
- if (isCreated) return;
- isCreated = true;
-
- // Create classes and their features
- generalizationTargetChangedExtensionEClass = createEClass(GENERALIZATION_TARGET_CHANGED_EXTENSION);
-
- generalizationSourceChangedExtensionEClass = createEClass(GENERALIZATION_SOURCE_CHANGED_EXTENSION);
-
- umlDiffExtensionEClass = createEClass(UML_DIFF_EXTENSION);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isInitialized = false;
-
- /**
- * Complete the initialization of the package and its meta-model. This
- * method is guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void initializePackageContents() {
- if (isInitialized) return;
- isInitialized = true;
-
- // Initialize package
- setName(eNAME);
- setNsPrefix(eNS_PREFIX);
- setNsURI(eNS_URI);
-
- // Obtain other dependent packages
- DiffPackage theDiffPackage = (DiffPackage)EPackage.Registry.INSTANCE.getEPackage(DiffPackage.eNS_URI);
-
- // Create type parameters
-
- // Set bounds for type parameters
-
- // Add supertypes to classes
- generalizationTargetChangedExtensionEClass.getESuperTypes().add(this.getUMLDiffExtension());
- generalizationTargetChangedExtensionEClass.getESuperTypes().add(theDiffPackage.getUpdateReference());
- generalizationSourceChangedExtensionEClass.getESuperTypes().add(this.getUMLDiffExtension());
- generalizationSourceChangedExtensionEClass.getESuperTypes().add(theDiffPackage.getMoveModelElement());
- umlDiffExtensionEClass.getESuperTypes().add(theDiffPackage.getAbstractDiffExtension());
-
- // Initialize classes and features; add operations and parameters
- initEClass(generalizationTargetChangedExtensionEClass, GeneralizationTargetChangedExtension.class, "GeneralizationTargetChangedExtension", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(generalizationSourceChangedExtensionEClass, GeneralizationSourceChangedExtension.class, "GeneralizationSourceChangedExtension", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(umlDiffExtensionEClass, UMLDiffExtension.class, "UMLDiffExtension", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- // Create resource
- createResource(eNS_URI);
- }
-
-} //Uml_diff_extensionPackageImpl
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/util/Uml_diff_extensionAdapterFactory.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/util/Uml_diff_extensionAdapterFactory.java deleted file mode 100644 index a50c58f305d..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/util/Uml_diff_extensionAdapterFactory.java +++ /dev/null @@ -1,301 +0,0 @@ -/**
- * Copyright (c) 2012 CEA LIST.
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *
- */
-package org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.util;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notifier;
-
-import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
-
-import org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChange;
-import org.eclipse.emf.compare.diff.metamodel.MoveModelElement;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChange;
-import org.eclipse.emf.compare.diff.metamodel.UpdateModelElement;
-import org.eclipse.emf.compare.diff.metamodel.UpdateReference;
-
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.*;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Adapter Factory</b> for the model.
- * It provides an adapter <code>createXXX</code> method for each class of the model.
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.Uml_diff_extensionPackage
- * @generated
- */
-public class Uml_diff_extensionAdapterFactory extends AdapterFactoryImpl {
- /**
- * The cached model package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static Uml_diff_extensionPackage modelPackage;
-
- /**
- * Creates an instance of the adapter factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Uml_diff_extensionAdapterFactory() {
- if (modelPackage == null) {
- modelPackage = Uml_diff_extensionPackage.eINSTANCE;
- }
- }
-
- /**
- * Returns whether this factory is applicable for the type of the object.
- * <!-- begin-user-doc -->
- * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
- * <!-- end-user-doc -->
- * @return whether this factory is applicable for the type of the object.
- * @generated
- */
- @Override
- public boolean isFactoryForType(Object object) {
- if (object == modelPackage) {
- return true;
- }
- if (object instanceof EObject) {
- return ((EObject)object).eClass().getEPackage() == modelPackage;
- }
- return false;
- }
-
- /**
- * The switch that delegates to the <code>createXXX</code> methods.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Uml_diff_extensionSwitch<Adapter> modelSwitch =
- new Uml_diff_extensionSwitch<Adapter>() {
- @Override
- public Adapter caseGeneralizationTargetChangedExtension(GeneralizationTargetChangedExtension object) {
- return createGeneralizationTargetChangedExtensionAdapter();
- }
- @Override
- public Adapter caseGeneralizationSourceChangedExtension(GeneralizationSourceChangedExtension object) {
- return createGeneralizationSourceChangedExtensionAdapter();
- }
- @Override
- public Adapter caseUMLDiffExtension(UMLDiffExtension object) {
- return createUMLDiffExtensionAdapter();
- }
- @Override
- public Adapter caseAbstractDiffExtension(AbstractDiffExtension object) {
- return createAbstractDiffExtensionAdapter();
- }
- @Override
- public Adapter caseDiffElement(DiffElement object) {
- return createDiffElementAdapter();
- }
- @Override
- public Adapter caseReferenceChange(ReferenceChange object) {
- return createReferenceChangeAdapter();
- }
- @Override
- public Adapter caseUpdateReference(UpdateReference object) {
- return createUpdateReferenceAdapter();
- }
- @Override
- public Adapter caseModelElementChange(ModelElementChange object) {
- return createModelElementChangeAdapter();
- }
- @Override
- public Adapter caseUpdateModelElement(UpdateModelElement object) {
- return createUpdateModelElementAdapter();
- }
- @Override
- public Adapter caseMoveModelElement(MoveModelElement object) {
- return createMoveModelElementAdapter();
- }
- @Override
- public Adapter defaultCase(EObject object) {
- return createEObjectAdapter();
- }
- };
-
- /**
- * Creates an adapter for the <code>target</code>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param target the object to adapt.
- * @return the adapter for the <code>target</code>.
- * @generated
- */
- @Override
- public Adapter createAdapter(Notifier target) {
- return modelSwitch.doSwitch((EObject)target);
- }
-
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.GeneralizationTargetChangedExtension <em>Generalization Target Changed Extension</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.GeneralizationTargetChangedExtension
- * @generated
- */
- public Adapter createGeneralizationTargetChangedExtensionAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.GeneralizationSourceChangedExtension <em>Generalization Source Changed Extension</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.GeneralizationSourceChangedExtension
- * @generated
- */
- public Adapter createGeneralizationSourceChangedExtensionAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.UMLDiffExtension <em>UML Diff Extension</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.UMLDiffExtension
- * @generated
- */
- public Adapter createUMLDiffExtensionAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension <em>Abstract Diff Extension</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension
- * @generated
- */
- public Adapter createAbstractDiffExtensionAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.DiffElement <em>Element</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffElement
- * @generated
- */
- public Adapter createDiffElementAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.ReferenceChange <em>Reference Change</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.ReferenceChange
- * @generated
- */
- public Adapter createReferenceChangeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.UpdateReference <em>Update Reference</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.UpdateReference
- * @generated
- */
- public Adapter createUpdateReferenceAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.ModelElementChange <em>Model Element Change</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.ModelElementChange
- * @generated
- */
- public Adapter createModelElementChangeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.UpdateModelElement <em>Update Model Element</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.UpdateModelElement
- * @generated
- */
- public Adapter createUpdateModelElementAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.MoveModelElement <em>Move Model Element</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.MoveModelElement
- * @generated
- */
- public Adapter createMoveModelElementAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for the default case.
- * <!-- begin-user-doc -->
- * This default implementation returns null.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @generated
- */
- public Adapter createEObjectAdapter() {
- return null;
- }
-
-} //Uml_diff_extensionAdapterFactory
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/util/Uml_diff_extensionSwitch.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/util/Uml_diff_extensionSwitch.java deleted file mode 100644 index 460f45f2a74..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src-gen/org/eclipse/papyrus/uml/compare/diff/uml_diff_extension/util/Uml_diff_extensionSwitch.java +++ /dev/null @@ -1,288 +0,0 @@ -/**
- * Copyright (c) 2012 CEA LIST.
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *
- */
-package org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.util;
-
-import org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChange;
-import org.eclipse.emf.compare.diff.metamodel.MoveModelElement;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChange;
-import org.eclipse.emf.compare.diff.metamodel.UpdateModelElement;
-import org.eclipse.emf.compare.diff.metamodel.UpdateReference;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-
-import org.eclipse.emf.ecore.util.Switch;
-
-import org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.*;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Switch</b> for the model's inheritance hierarchy.
- * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
- * to invoke the <code>caseXXX</code> method for each class of the model,
- * starting with the actual class of the object
- * and proceeding up the inheritance hierarchy
- * until a non-null result is returned,
- * which is the result of the switch.
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.Uml_diff_extensionPackage
- * @generated
- */
-public class Uml_diff_extensionSwitch<T> extends Switch<T> {
- /**
- * The cached model package
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static Uml_diff_extensionPackage modelPackage;
-
- /**
- * Creates an instance of the switch.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Uml_diff_extensionSwitch() {
- if (modelPackage == null) {
- modelPackage = Uml_diff_extensionPackage.eINSTANCE;
- }
- }
-
- /**
- * Checks whether this is a switch for the given package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @parameter ePackage the package in question.
- * @return whether this is a switch for the given package.
- * @generated
- */
- @Override
- protected boolean isSwitchFor(EPackage ePackage) {
- return ePackage == modelPackage;
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- @Override
- protected T doSwitch(int classifierID, EObject theEObject) {
- switch (classifierID) {
- case Uml_diff_extensionPackage.GENERALIZATION_TARGET_CHANGED_EXTENSION: {
- GeneralizationTargetChangedExtension generalizationTargetChangedExtension = (GeneralizationTargetChangedExtension)theEObject;
- T result = caseGeneralizationTargetChangedExtension(generalizationTargetChangedExtension);
- if (result == null) result = caseUMLDiffExtension(generalizationTargetChangedExtension);
- if (result == null) result = caseUpdateReference(generalizationTargetChangedExtension);
- if (result == null) result = caseAbstractDiffExtension(generalizationTargetChangedExtension);
- if (result == null) result = caseReferenceChange(generalizationTargetChangedExtension);
- if (result == null) result = caseDiffElement(generalizationTargetChangedExtension);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case Uml_diff_extensionPackage.GENERALIZATION_SOURCE_CHANGED_EXTENSION: {
- GeneralizationSourceChangedExtension generalizationSourceChangedExtension = (GeneralizationSourceChangedExtension)theEObject;
- T result = caseGeneralizationSourceChangedExtension(generalizationSourceChangedExtension);
- if (result == null) result = caseUMLDiffExtension(generalizationSourceChangedExtension);
- if (result == null) result = caseMoveModelElement(generalizationSourceChangedExtension);
- if (result == null) result = caseAbstractDiffExtension(generalizationSourceChangedExtension);
- if (result == null) result = caseUpdateModelElement(generalizationSourceChangedExtension);
- if (result == null) result = caseModelElementChange(generalizationSourceChangedExtension);
- if (result == null) result = caseDiffElement(generalizationSourceChangedExtension);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case Uml_diff_extensionPackage.UML_DIFF_EXTENSION: {
- UMLDiffExtension umlDiffExtension = (UMLDiffExtension)theEObject;
- T result = caseUMLDiffExtension(umlDiffExtension);
- if (result == null) result = caseAbstractDiffExtension(umlDiffExtension);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- default: return defaultCase(theEObject);
- }
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Generalization Target Changed Extension</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Generalization Target Changed Extension</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseGeneralizationTargetChangedExtension(GeneralizationTargetChangedExtension object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Generalization Source Changed Extension</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Generalization Source Changed Extension</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseGeneralizationSourceChangedExtension(GeneralizationSourceChangedExtension object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>UML Diff Extension</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>UML Diff Extension</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseUMLDiffExtension(UMLDiffExtension object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Abstract Diff Extension</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Abstract Diff Extension</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseAbstractDiffExtension(AbstractDiffExtension object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Element</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Element</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseDiffElement(DiffElement object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Reference Change</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Reference Change</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseReferenceChange(ReferenceChange object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Update Reference</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Update Reference</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseUpdateReference(UpdateReference object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Model Element Change</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Model Element Change</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseModelElementChange(ModelElementChange object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Update Model Element</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Update Model Element</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseUpdateModelElement(UpdateModelElement object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Move Model Element</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Move Model Element</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseMoveModelElement(MoveModelElement object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch, but this is the last case anyway.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject)
- * @generated
- */
- @Override
- public T defaultCase(EObject object) {
- return null;
- }
-
-} //Uml_diff_extensionSwitch
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/Activator.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/Activator.java deleted file mode 100644 index 0438a809b76..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/Activator.java +++ /dev/null @@ -1,70 +0,0 @@ -/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.diff;
-
-import org.eclipse.papyrus.infra.core.log.LogHelper;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.compare.diff"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /** the Papyrus log helper */
- public static LogHelper log;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- log = new LogHelper(this);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/check/PapyrusUML2ReferencesCheck.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/check/PapyrusUML2ReferencesCheck.java deleted file mode 100644 index 65a8d9050ba..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/check/PapyrusUML2ReferencesCheck.java +++ /dev/null @@ -1,64 +0,0 @@ -package org.eclipse.papyrus.uml.compare.diff.check;
-
-import java.io.IOException;
-import java.util.Properties;
-
-import org.eclipse.emf.compare.diff.engine.IMatchManager;
-import org.eclipse.emf.compare.uml2.diff.UML2DiffEngine;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.papyrus.infra.emf.compare.diff.check.FeaturesCheck;
-import org.eclipse.papyrus.infra.emf.compare.diff.check.PapyrusReferencesCheck;
-
-//adapted code from EMF-Compare UML2ReferencesCheck
-public class PapyrusUML2ReferencesCheck extends PapyrusReferencesCheck {
-
-
-
- /**
- * Parameters.
- */
- private static final String SUBSETS_OF_CONTAINMENT_PROPERTIES = "/org/eclipse/emf/compare/uml2/diff/internal/subsets.of.containment.properties"; //$NON-NLS-1$
-
- /**
- * Properties for parameters.
- */
- private static final Properties SUBSETS_OF_CONTAINMENT = new Properties();
-
- static {
- try {
- SUBSETS_OF_CONTAINMENT.load(UML2DiffEngine.class.getResourceAsStream(SUBSETS_OF_CONTAINMENT_PROPERTIES));
- } catch (IOException e) {
- // ignore
- }
- }
-
- /**
- * Constructor.
- *
- * @param matchManager
- * {@link IMatchManager}
- */
- public PapyrusUML2ReferencesCheck(final IMatchManager matchManager, final FeaturesCheck checker) {
- super(matchManager, checker);
- }
-
- @Override
- protected boolean shouldBeIgnored(EReference reference) {
- final String fqn = fqn(reference);
- boolean answer = super.shouldBeIgnored(reference) || SUBSETS_OF_CONTAINMENT.getProperty(fqn) != null;
- return super.shouldBeIgnored(reference) || SUBSETS_OF_CONTAINMENT.getProperty(fqn) != null;
- }
-
- /**
- * Transforms the {@link EReference} to a string.
- *
- * @param reference
- * The {@link EReference}
- * @return The string.
- */
- private String fqn(EReference reference) {
- final StringBuilder fqn = new StringBuilder(reference.getEContainingClass().getName());
- fqn.append('.').append(reference.getName());
- return fqn.toString();
- }
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/internal/merger/GeneralizationSourceMerger.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/internal/merger/GeneralizationSourceMerger.java deleted file mode 100644 index 836898bffeb..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/internal/merger/GeneralizationSourceMerger.java +++ /dev/null @@ -1,55 +0,0 @@ -/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.diff.internal.merger;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest;
-import org.eclipse.papyrus.infra.emf.compare.diff.internal.command.PapyrusMergeCommandProvider;
-import org.eclipse.papyrus.infra.emf.compare.diff.internal.merger.MoveModelElementTransactionalMerger;
-import org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.GeneralizationSourceChangedExtension;
-import org.eclipse.uml2.uml.Generalization;
-
-/**
- *
- * The merger for {@link GeneralizationSourceChangedExtension}
- *
- */
-public class GeneralizationSourceMerger extends MoveModelElementTransactionalMerger {
-
-
- @Override
- public Command getDoApplyInOriginCommand(TransactionalEditingDomain domain) {
- final GeneralizationSourceChangedExtension theDiff = (GeneralizationSourceChangedExtension)this.diff;
- final Generalization generalization = (Generalization)theDiff.getLeftElement();
- final EObject oldEnd = theDiff.getRightTarget();
- final EObject newEnd = theDiff.getLeftTarget();
- final int direction = ReorientRequest.REORIENT_SOURCE;
- final ReorientRelationshipRequest request = new ReorientRelationshipRequest(domain, generalization, newEnd, oldEnd, direction);
- return PapyrusMergeCommandProvider.INSTANCE.getCommand(generalization, request);
- }
-
- @Override
- public Command getDoUndoInTargetCommand(TransactionalEditingDomain domain) {
- final GeneralizationSourceChangedExtension theDiff = (GeneralizationSourceChangedExtension)this.diff;
- final Generalization generalization = (Generalization)theDiff.getRightElement();
- final EObject oldEnd = theDiff.getLeftTarget();
- final EObject newEnd = theDiff.getRightTarget();
- final int direction = ReorientRequest.REORIENT_SOURCE;
- final ReorientRelationshipRequest request = new ReorientRelationshipRequest(domain, generalization, newEnd, oldEnd, direction);
- return PapyrusMergeCommandProvider.INSTANCE.getCommand(generalization, request);
- }
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/internal/merger/GeneralizationTargetMerger.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/internal/merger/GeneralizationTargetMerger.java deleted file mode 100644 index 270d9bbaff7..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/internal/merger/GeneralizationTargetMerger.java +++ /dev/null @@ -1,54 +0,0 @@ -/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.diff.internal.merger;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest;
-import org.eclipse.papyrus.infra.emf.compare.diff.internal.command.PapyrusMergeCommandProvider;
-import org.eclipse.papyrus.infra.emf.compare.diff.internal.merger.UpdateReferenceTransactionalMerger;
-import org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.GeneralizationTargetChangedExtension;
-import org.eclipse.uml2.uml.Generalization;
-
-/**
- *
- * the merger for {@link GeneralizationTargetChangedExtension
- *
- */
-public class GeneralizationTargetMerger extends UpdateReferenceTransactionalMerger {
-
- @Override
- public Command getDoApplyInOriginCommand(TransactionalEditingDomain domain) {
- final GeneralizationTargetChangedExtension theDiff = (GeneralizationTargetChangedExtension)this.diff;
- final Generalization generalization = (Generalization)theDiff.getLeftElement();
- final EObject oldEnd = theDiff.getRightTarget();
- final EObject newEnd = theDiff.getLeftTarget();
- final int direction = ReorientRequest.REORIENT_TARGET;
- final ReorientRelationshipRequest request = new ReorientRelationshipRequest(domain, generalization, newEnd, oldEnd, direction);
- return PapyrusMergeCommandProvider.INSTANCE.getCommand(generalization, request);
- }
-
- @Override
- public Command getDoUndoInTargetCommand(TransactionalEditingDomain domain) {
- final GeneralizationTargetChangedExtension theDiff = (GeneralizationTargetChangedExtension)this.diff;
- final Generalization generalization = (Generalization)theDiff.getRightElement();
- final EObject oldEnd = theDiff.getLeftTarget();
- final EObject newEnd = theDiff.getRightTarget();
- final int direction = ReorientRequest.REORIENT_TARGET;
- final ReorientRelationshipRequest request = new ReorientRelationshipRequest(domain, generalization, newEnd, oldEnd, direction);
- return PapyrusMergeCommandProvider.INSTANCE.getCommand(generalization, request);
- }
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/internal/merger/UMLProfileApplicationAdditionMerger.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/internal/merger/UMLProfileApplicationAdditionMerger.java deleted file mode 100644 index ad3a3d65f8a..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/internal/merger/UMLProfileApplicationAdditionMerger.java +++ /dev/null @@ -1,37 +0,0 @@ -/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- * Adapted code from EMF-Compare
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.diff.internal.merger;
-
-import org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension;
-import org.eclipse.papyrus.infra.emf.compare.diff.internal.merger.DefaultExtensionTransactionalMerger;
-
-/**
- * Merger of UMLProfileApplicationAddition differences.
- *
- * @author Cedric Notot <a href="mailto:cedric.notot@obeo.fr">cedric.notot@obeo.fr</a>
- */
-public class UMLProfileApplicationAdditionMerger extends DefaultExtensionTransactionalMerger {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.DefaultExtensionMerger#isBusinessDependency(boolean,
- * org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension)
- */
- @Override
- protected boolean isBusinessDependency(boolean applyInOrigin, AbstractDiffExtension requiredDiff) {
- return applyInOrigin;
- }
-
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/internal/merger/UMLProfileApplicationRemovalMerger.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/internal/merger/UMLProfileApplicationRemovalMerger.java deleted file mode 100644 index e0be7777502..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/internal/merger/UMLProfileApplicationRemovalMerger.java +++ /dev/null @@ -1,37 +0,0 @@ -/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- * Adapted code from EMF-Compare
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.diff.internal.merger;
-
-import org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension;
-import org.eclipse.papyrus.infra.emf.compare.diff.internal.merger.DefaultExtensionTransactionalMerger;
-
-/**
- * Merger of UMLProfileApplicationRemoval differences.
- *
- * @author Cedric Notot <a href="mailto:cedric.notot@obeo.fr">cedric.notot@obeo.fr</a>
- */
-public class UMLProfileApplicationRemovalMerger extends DefaultExtensionTransactionalMerger {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.DefaultExtensionMerger#isBusinessDependency(boolean,
- * org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension)
- */
- @Override
- protected boolean isBusinessDependency(boolean applyInOrigin, AbstractDiffExtension requiredDiff) {
- return !applyInOrigin;
- }
-
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/internal/merger/UMLStereotypeApplicationAdditionMerger.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/internal/merger/UMLStereotypeApplicationAdditionMerger.java deleted file mode 100644 index 6b47a883b48..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/internal/merger/UMLStereotypeApplicationAdditionMerger.java +++ /dev/null @@ -1,37 +0,0 @@ -/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- * Adapted code from EMF-Compare
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.diff.internal.merger;
-
-import org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension;
-import org.eclipse.papyrus.infra.emf.compare.diff.internal.merger.DefaultExtensionTransactionalMerger;
-
-/**
- * Merger of UMLStereotypeApplicationAddition differences.
- *
- * @author Cedric Notot <a href="mailto:cedric.notot@obeo.fr">cedric.notot@obeo.fr</a>
- */
-public class UMLStereotypeApplicationAdditionMerger extends DefaultExtensionTransactionalMerger {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.DefaultExtensionMerger#isBusinessDependency(boolean,
- * org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension)
- */
- @Override
- protected boolean isBusinessDependency(boolean applyInOrigin, AbstractDiffExtension requiredDiff) {
- return !applyInOrigin;
- }
-
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/internal/merger/UMLStereotypeApplicationRemovalMerger.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/internal/merger/UMLStereotypeApplicationRemovalMerger.java deleted file mode 100644 index e4718dc2a00..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/internal/merger/UMLStereotypeApplicationRemovalMerger.java +++ /dev/null @@ -1,37 +0,0 @@ -/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- * Adapted code from EMF-Compare
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.diff.internal.merger;
-
-import org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension;
-import org.eclipse.papyrus.infra.emf.compare.diff.internal.merger.DefaultExtensionTransactionalMerger;
-
-/**
- * Merger of UMLStereotypeApplicationRemoval differences.
- *
- * @author Cedric Notot <a href="mailto:cedric.notot@obeo.fr">cedric.notot@obeo.fr</a>
- */
-public class UMLStereotypeApplicationRemovalMerger extends DefaultExtensionTransactionalMerger {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.DefaultExtensionMerger#isBusinessDependency(boolean,
- * org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension)
- */
- @Override
- protected boolean isBusinessDependency(boolean applyInOrigin, AbstractDiffExtension requiredDiff) {
- return applyInOrigin;
- }
-
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/internal/provider/UMLTransactionalMergerProvider.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/internal/provider/UMLTransactionalMergerProvider.java deleted file mode 100644 index 83613202bc1..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/internal/provider/UMLTransactionalMergerProvider.java +++ /dev/null @@ -1,90 +0,0 @@ -/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.diff.internal.provider;
-
-import java.util.Map;
-
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.uml2diff.impl.UMLProfileApplicationAdditionImpl;
-import org.eclipse.emf.compare.uml2diff.impl.UMLProfileApplicationRemovalImpl;
-import org.eclipse.emf.compare.uml2diff.impl.UMLStereotypeApplicationAdditionImpl;
-import org.eclipse.emf.compare.uml2diff.impl.UMLStereotypeApplicationRemovalImpl;
-import org.eclipse.emf.compare.uml2diff.impl.UMLStereotypeAttributeChangeLeftTargetImpl;
-import org.eclipse.emf.compare.uml2diff.impl.UMLStereotypeAttributeChangeRightTargetImpl;
-import org.eclipse.emf.compare.uml2diff.impl.UMLStereotypeReferenceChangeLeftTargetImpl;
-import org.eclipse.emf.compare.uml2diff.impl.UMLStereotypeReferenceChangeRightTargetImpl;
-import org.eclipse.emf.compare.uml2diff.impl.UMLStereotypeReferenceOrderChangeImpl;
-import org.eclipse.emf.compare.uml2diff.impl.UMLStereotypeUpdateAttributeImpl;
-import org.eclipse.emf.compare.uml2diff.impl.UMLStereotypeUpdateReferenceImpl;
-import org.eclipse.papyrus.infra.emf.compare.diff.internal.merger.DefaultExtensionTransactionalMerger;
-import org.eclipse.papyrus.infra.emf.compare.diff.internal.util.PapyrusCompareMap;
-import org.eclipse.papyrus.infra.emf.compare.diff.merge.ITransactionalMerger;
-import org.eclipse.papyrus.infra.emf.compare.diff.provider.ITransactionalMergerProvider;
-import org.eclipse.papyrus.uml.compare.diff.internal.merger.GeneralizationSourceMerger;
-import org.eclipse.papyrus.uml.compare.diff.internal.merger.GeneralizationTargetMerger;
-import org.eclipse.papyrus.uml.compare.diff.internal.merger.UMLProfileApplicationAdditionMerger;
-import org.eclipse.papyrus.uml.compare.diff.internal.merger.UMLProfileApplicationRemovalMerger;
-import org.eclipse.papyrus.uml.compare.diff.internal.merger.UMLStereotypeApplicationAdditionMerger;
-import org.eclipse.papyrus.uml.compare.diff.internal.merger.UMLStereotypeApplicationRemovalMerger;
-import org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationSourceChangedExtensionImpl;
-import org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.impl.GeneralizationTargetChangedExtensionImpl;
-
-
-
-
-/**
- *
- * This class provides the mergers for the UML DiffElement
- *
- */
-public class UMLTransactionalMergerProvider implements ITransactionalMergerProvider {
-
- /**
- * This map keeps a bridge between a given {@link DiffElement}'s class and the most accurate merger's
- * class for that particular {@link DiffElement}.
- */
- private Map<Class<? extends DiffElement>, Class<? extends ITransactionalMerger>> mergerTypes;
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.IMergerProvider#getMergers()
- */
- public Map<Class<? extends DiffElement>, Class<? extends ITransactionalMerger>> getMergers() {
- if(mergerTypes == null) {
- mergerTypes = new PapyrusCompareMap<Class<? extends DiffElement>, Class<? extends ITransactionalMerger>>();
- //its it better to set MyClassImpl.class than MyInterface.class, in the 2nd case, we don't have guarantee that the method getBestMerger find the real best merger
- //another workaround is to implemements the method providesMerger in the Extension
- mergerTypes.put(GeneralizationSourceChangedExtensionImpl.class, GeneralizationSourceMerger.class);
- mergerTypes.put(GeneralizationTargetChangedExtensionImpl.class, GeneralizationTargetMerger.class);
- mergerTypes.put(UMLProfileApplicationAdditionImpl.class, UMLProfileApplicationAdditionMerger.class);
- mergerTypes.put(UMLProfileApplicationRemovalImpl.class, UMLProfileApplicationRemovalMerger.class);
- mergerTypes.put(UMLStereotypeApplicationAdditionImpl.class, UMLStereotypeApplicationAdditionMerger.class);
- mergerTypes.put(UMLStereotypeApplicationRemovalImpl.class, UMLStereotypeApplicationRemovalMerger.class);
-
- //the mergers for Stereotype properties
- mergerTypes.put(UMLStereotypeAttributeChangeLeftTargetImpl.class, DefaultExtensionTransactionalMerger.class);
- mergerTypes.put(UMLStereotypeAttributeChangeRightTargetImpl.class, DefaultExtensionTransactionalMerger.class);
- mergerTypes.put(UMLStereotypeReferenceChangeLeftTargetImpl.class, DefaultExtensionTransactionalMerger.class);
- mergerTypes.put(UMLStereotypeReferenceChangeRightTargetImpl.class, DefaultExtensionTransactionalMerger.class);
- mergerTypes.put(UMLStereotypeReferenceOrderChangeImpl.class, DefaultExtensionTransactionalMerger.class);
- mergerTypes.put(UMLStereotypeUpdateAttributeImpl.class, DefaultExtensionTransactionalMerger.class);
- mergerTypes.put(UMLStereotypeUpdateReferenceImpl.class, DefaultExtensionTransactionalMerger.class);
-
- }
- return mergerTypes;
- }
-
-
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/internal/utils/MergerUtils.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/internal/utils/MergerUtils.java deleted file mode 100644 index 69cc690f18c..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/internal/utils/MergerUtils.java +++ /dev/null @@ -1,63 +0,0 @@ -/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.diff.internal.utils;
-
-import org.eclipse.emf.edit.domain.IEditingDomainProvider;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.papyrus.infra.core.sasheditor.editor.IMultiPageEditorPart;
-import org.eclipse.papyrus.infra.tools.util.EditorHelper;
-import org.eclipse.ui.IEditorPart;
-
-/**
- *
- * This class provides useful method for the mergers
- *
- */
-//TODO used?
-public final class MergerUtils {
-
- /**
- *
- * Constructor.
- *
- */
- private MergerUtils() {
- //nothing to do
- }
-
- /**
- *
- * @return
- * <code>true</code> if we can use the Papyrus Mergers
- */
- public static boolean usePapyrusMerger() {
- return getEditingDomain() != null;
- }
-
- /**
- *
- * @return
- * the {@link TransactionalEditingDomain} to use for the merge action, or <code>null</code> if not found
- */
- public static TransactionalEditingDomain getEditingDomain() {
- IEditorPart editor = EditorHelper.getCurrentEditor();
- if(editor instanceof IMultiPageEditorPart) {
- editor = ((IMultiPageEditorPart)editor).getActiveEditor();
- }
- if(editor instanceof IEditingDomainProvider) {
- return (TransactionalEditingDomain)((IEditingDomainProvider)editor).getEditingDomain();
- }
- return null;
- }
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/internal/utils/UMLDiffElementExtensionBuilder.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/internal/utils/UMLDiffElementExtensionBuilder.java deleted file mode 100644 index d8870606965..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/internal/utils/UMLDiffElementExtensionBuilder.java +++ /dev/null @@ -1,65 +0,0 @@ -/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.diff.internal.utils;
-
-import org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension;
-import org.eclipse.emf.compare.diff.metamodel.MoveModelElement;
-import org.eclipse.emf.compare.diff.metamodel.UpdateReference;
-import org.eclipse.emf.compare.diff.metamodel.util.DiffSwitch;
-import org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.GeneralizationSourceChangedExtension;
-import org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.GeneralizationTargetChangedExtension;
-import org.eclipse.papyrus.uml.compare.diff.uml_diff_extension.Uml_diff_extensionFactory;
-import org.eclipse.uml2.uml.Generalization;
-
-
-
-public class UMLDiffElementExtensionBuilder extends DiffSwitch<AbstractDiffExtension> {
-
- @Override
- public AbstractDiffExtension caseMoveModelElement(final MoveModelElement moveModelElement) {
- if(moveModelElement.getLeftElement() instanceof Generalization) {
- return createGeneralizationSourceChangedExtension(moveModelElement);
- }
- return super.caseMoveModelElement(moveModelElement);
- }
-
- @Override
- public AbstractDiffExtension caseUpdateReference(final UpdateReference updateReference) {
- if(updateReference.getLeftElement() instanceof Generalization) {
- return createGeneralizationTargetChangedExtension(updateReference);
- }
- return super.caseUpdateReference(updateReference);
- }
-
- private GeneralizationSourceChangedExtension createGeneralizationSourceChangedExtension(final MoveModelElement moveModelElement) {
- final GeneralizationSourceChangedExtension newElement = Uml_diff_extensionFactory.eINSTANCE.createGeneralizationSourceChangedExtension();
- newElement.setLeftElement(moveModelElement.getLeftElement());
- newElement.setLeftTarget(moveModelElement.getLeftTarget());
- newElement.setRightElement(moveModelElement.getRightElement());
- newElement.setRightTarget(moveModelElement.getRightTarget());
- return newElement;
- }
-
- private GeneralizationTargetChangedExtension createGeneralizationTargetChangedExtension(final UpdateReference updateReference) {
- final GeneralizationTargetChangedExtension newElement = Uml_diff_extensionFactory.eINSTANCE.createGeneralizationTargetChangedExtension();
- newElement.setLeftElement(updateReference.getLeftElement());
- newElement.setLeftTarget(updateReference.getLeftTarget());
- newElement.setReference(updateReference.getReference());
- newElement.setRemote(updateReference.isRemote());
- newElement.setRightElement(updateReference.getRightElement());
- newElement.setRightTarget(updateReference.getRightTarget());
- return newElement;
- }
-
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/messages/Messages.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/messages/Messages.java deleted file mode 100644 index 379560a3197..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/messages/Messages.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.eclipse.papyrus.uml.compare.diff.messages;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.papyrus.uml.compare.diff.messages.messages"; //$NON-NLS-1$
-
- public static String GetDiffElementLabel_StereotypeAppliedOnAnElement;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/messages/messages.properties b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/messages/messages.properties deleted file mode 100644 index a340ff643da..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/messages/messages.properties +++ /dev/null @@ -1 +0,0 @@ -GetDiffElementLabel_StereotypeAppliedOnAnElement=The stereotype {0} has been applied on the element
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/queries/GetDiffElementLabel.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/queries/GetDiffElementLabel.java deleted file mode 100644 index 5f6fa9af8cb..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/queries/GetDiffElementLabel.java +++ /dev/null @@ -1,321 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2012 CEA LIST. - * - * - * 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: - * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.papyrus.uml.compare.diff.queries; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension; -import org.eclipse.emf.compare.diff.metamodel.AttributeChange; -import org.eclipse.emf.compare.diff.metamodel.AttributeChangeLeftTarget; -import org.eclipse.emf.compare.diff.metamodel.AttributeChangeRightTarget; -import org.eclipse.emf.compare.diff.metamodel.AttributeOrderChange; -import org.eclipse.emf.compare.diff.metamodel.DiffGroup; -import org.eclipse.emf.compare.diff.metamodel.ModelElementChangeLeftTarget; -import org.eclipse.emf.compare.diff.metamodel.ModelElementChangeRightTarget; -import org.eclipse.emf.compare.diff.metamodel.MoveModelElement; -import org.eclipse.emf.compare.diff.metamodel.ReferenceChangeLeftTarget; -import org.eclipse.emf.compare.diff.metamodel.ReferenceChangeRightTarget; -import org.eclipse.emf.compare.diff.metamodel.ReferenceOrderChange; -import org.eclipse.emf.compare.diff.metamodel.UpdateAttribute; -import org.eclipse.emf.compare.diff.metamodel.UpdateContainmentFeature; -import org.eclipse.emf.compare.diff.metamodel.UpdateModelElement; -import org.eclipse.emf.compare.diff.metamodel.UpdateReference; -import org.eclipse.emf.compare.diff.provider.DiffElementItemProvider; -import org.eclipse.emf.compare.uml2diff.UMLStereotypeApplicationAddition; -import org.eclipse.emf.compare.uml2diff.UMLStereotypeUpdateAttribute; -import org.eclipse.emf.compare.util.AdapterUtils; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException; -import org.eclipse.emf.facet.infra.query.core.java.IJavaModelQuery; -import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList; -import org.eclipse.jface.viewers.LabelProvider; -import org.eclipse.osgi.util.NLS; -import org.eclipse.papyrus.infra.core.sasheditor.editor.IMultiPageEditorPart; -import org.eclipse.papyrus.infra.emf.Activator; -import org.eclipse.papyrus.infra.emf.compare.ui.internal.utils.CustomizationAndViewerActionDispatcher; -import org.eclipse.papyrus.infra.tools.util.EditorHelper; -import org.eclipse.papyrus.infra.widgets.toolbox.notification.builders.NotificationBuilder; -import org.eclipse.papyrus.uml.compare.diff.messages.Messages; -import org.eclipse.ui.IEditorPart; - -/** - * - * This query returns the label to display for DiffElement - * - * TODO duplicated code from infra.emf.compare.ui. Using the new metamodel , the inheritance between differents packages will allow to write this - * custom - * for AbstractDiffExtension in infra.emf.compare.ui - * - */ -public class GetDiffElementLabel implements IJavaModelQuery<EObject, String> { - - /** - * The code of this method is adapter of the implementation of getText in the Default Label Provider for each of the managed DiffElement - * - * @see org.eclipse.emf.facet.infra.query.core.java.IJavaModelQuery#evaluate(org.eclipse.emf.ecore.EObject, - * org.eclipse.emf.facet.infra.query.core.java.ParameterValueList) - * - * @param context - * @param parameterValues - * @return - * @throws ModelQueryExecutionException - */ - public String evaluate(final EObject context, final ParameterValueList parameterValues) throws ModelQueryExecutionException { - final AdapterFactory adapter = AdapterUtils.getAdapterFactory(); - final DiffElementItemProvider itemProvider = new DiffElementItemProvider(adapter); - IEditorPart editor = EditorHelper.getCurrentEditor(); - - if(editor instanceof IMultiPageEditorPart) { - editor = ((IMultiPageEditorPart)editor).getActiveEditor(); - } - - if(editor == null) { - return null; - } - LabelProvider labelProvider; - try { - labelProvider = CustomizationAndViewerActionDispatcher.getExistingLabelProvider(editor); - } catch (NullPointerException e) { - return null; - } - String diffLabel = null; - if(context instanceof UMLStereotypeUpdateAttribute) { - final UMLStereotypeUpdateAttribute updateOp = (UMLStereotypeUpdateAttribute)context; - final String elementLabel = labelProvider.getText(updateOp.getLeftElement()); - final UpdateAttribute hiddenDiffElement = (UpdateAttribute)updateOp.getHideElements().get(0); - final String attributeLabel = labelProvider.getText(hiddenDiffElement.getAttribute()); - final Object leftValue = hiddenDiffElement.getLeftElement().eGet(hiddenDiffElement.getAttribute()); - final Object rightValue = hiddenDiffElement.getRightElement().eGet(hiddenDiffElement.getAttribute()); - if(hiddenDiffElement.isRemote()) { - diffLabel = itemProvider.getString("_UI_RemoteUpdateAttribute_type", new Object[]{ attributeLabel, elementLabel, leftValue, rightValue, }); //$NON-NLS-1$ - } else { - if(hiddenDiffElement.isConflicting()) { - diffLabel = itemProvider.getString("_UI_UpdateAttribute_conflicting", new Object[]{ attributeLabel, rightValue, leftValue, }); //$NON-NLS-1$ - } else { - diffLabel = itemProvider.getString("_UI_UpdateAttribute_type", new Object[]{ attributeLabel, elementLabel, rightValue, leftValue, }); //$NON-NLS-1$ - } - } - } else if(context instanceof UpdateAttribute) { //comes from UpdateAttributeItemProvider - //TODO : not tested - final UpdateAttribute updateOp = (UpdateAttribute)context; - final String attributeLabel = labelProvider.getText(updateOp.getAttribute()); - final String elementLabel = labelProvider.getText(updateOp.getLeftElement()); - final Object leftValue = updateOp.getLeftElement().eGet(updateOp.getAttribute()); - final Object rightValue = updateOp.getRightElement().eGet(updateOp.getAttribute()); - if(updateOp.isRemote()) { - diffLabel = itemProvider.getString("_UI_RemoteUpdateAttribute_type", new Object[]{ attributeLabel, elementLabel, leftValue, rightValue, }); //$NON-NLS-1$ - } else { - if(updateOp.isConflicting()) { - diffLabel = itemProvider.getString("_UI_UpdateAttribute_conflicting", new Object[]{ attributeLabel, rightValue, leftValue, }); //$NON-NLS-1$ - } else { - diffLabel = itemProvider.getString("_UI_UpdateAttribute_type", new Object[]{ attributeLabel, elementLabel, rightValue, leftValue, }); //$NON-NLS-1$ - } - } - } else if(context instanceof AttributeOrderChange) { //comes from AttributeOrderChangeItemProvider - //TODO : not tested - //TODO : useful? - AttributeOrderChange attributeOrderChange = (AttributeOrderChange)context; - diffLabel = itemProvider.getString("_UI_AttributeOrderChange_type", new Object[]{ attributeOrderChange.getAttribute().getName() }); //$NON-NLS-1$ - - } else if(context instanceof AttributeChangeLeftTarget) {//comes from AttributeChangeLeftTargetItemProvider - //not tested - final AttributeChangeLeftTarget operation = (AttributeChangeLeftTarget)context; - final String attributeLabel = labelProvider.getText(operation.getAttribute()); - final String elementLabel = labelProvider.getText(operation.getRightElement()); - - if(operation.isRemote()) { - diffLabel = itemProvider.getString("_UI_RemoteRemoveAttribute_type", new Object[]{ operation.getLeftTarget(), attributeLabel, elementLabel, }); //$NON-NLS-1$ - } else { - diffLabel = itemProvider.getString("_UI_AddAttribute_type", new Object[]{ operation.getLeftTarget(), attributeLabel, elementLabel, }); //$NON-NLS-1$ - } - - } else if(context instanceof AttributeChangeRightTarget) { //comes from AttributeChangeRightTargetItemProvider - //TODO : not tested - final AttributeChangeRightTarget operation = (AttributeChangeRightTarget)context; - final String attributeLabel = labelProvider.getText(operation.getAttribute()); - final String elementLabel = labelProvider.getText(operation.getLeftElement()); - - if(operation.isRemote()) { - diffLabel = itemProvider.getString("_UI_RemoteAddAttribute_type", new Object[]{ operation.getRightTarget(), attributeLabel, elementLabel, }); //$NON-NLS-1$ - } else { - diffLabel = itemProvider.getString("_UI_RemoveAttribute_type", new Object[]{ operation.getRightTarget(), attributeLabel, elementLabel, }); //$NON-NLS-1$ - } - } else if(context instanceof AttributeChange) {//comes from AttributeChangeItemProvider - //TODO : not tested - //TODO : useful? - AttributeChange attributeChange = (AttributeChange)context; - diffLabel = itemProvider.getString("_UI_AttributeChange_type") + " " + attributeChange.isConflicting(); //$NON-NLS-1$ //$NON-NLS-2$ - } else if(context instanceof DiffGroup) { //comes from DiffGroupItemProvider - final DiffGroup group = (DiffGroup)context; - final EObject parent = group.getRightParent(); - if(parent != null) { - final String parentLabel = labelProvider.getText(parent); - diffLabel = itemProvider.getString("_UI_DiffGroup_type", new Object[]{ group.getSubchanges(), parentLabel }); //$NON-NLS-1$ - } else { - diffLabel = itemProvider.getString("_UI_DiffGroup_type", new Object[]{ group.getSubchanges(), "model" }); //$NON-NLS-1$ //$NON-NLS-2$ - } - } else if(context instanceof UpdateContainmentFeature) {//comes from UpdateContainmentFeatureItemProvider - //TODO : not tested - //TODO : useful? - final UpdateContainmentFeature operation = (UpdateContainmentFeature)context; - final String leftContainmentFeature = operation.getLeftElement().eContainmentFeature().getName(); - final String rightContainmentFeature = operation.getRightElement().eContainmentFeature().getName(); - - if(operation.isRemote()) { - diffLabel = itemProvider.getString("_UI_RemoteUpdateContainmentFeature_type", new Object[]{ rightContainmentFeature, leftContainmentFeature, }); //$NON-NLS-1$ - } else { - diffLabel = itemProvider.getString("_UI_UpdateContainmentFeature_type", new Object[]{ rightContainmentFeature, leftContainmentFeature, }); //$NON-NLS-1$ - } - } else if(context instanceof MoveModelElement) {//comes from MoveModelElementItemProvider - //TODO : not tested - final MoveModelElement operation = (MoveModelElement)context; - - final String elementLabel = labelProvider.getText(operation.getLeftElement()); - final String oldParentLabel = labelProvider.getText(operation.getLeftTarget()); - final String newParentLabel = labelProvider.getText(operation.getRightTarget()); - - if(operation.isRemote()) { - diffLabel = itemProvider.getString("_UI_RemoteMoveModelElement_type", new Object[]{ elementLabel, oldParentLabel, newParentLabel, }); //$NON-NLS-1$ - } else { - if(operation.isConflicting()) { - diffLabel = itemProvider.getString("_UI_MoveModelElement_conflicting", new Object[]{ elementLabel, oldParentLabel, newParentLabel, }); //$NON-NLS-1$ - } else { - diffLabel = itemProvider.getString("_UI_MoveModelElement_type", new Object[]{ elementLabel, oldParentLabel, newParentLabel, }); //$NON-NLS-1$ - } - } - } else if(context instanceof UpdateModelElement) {//comes from UpdateModelElementItemProvider - //TODO : not tested - //TODO : useful ? - UpdateModelElement updateModelElement = (UpdateModelElement)context; - diffLabel = ""; //$NON-NLS-1$ - if(updateModelElement instanceof UMLStereotypeApplicationAddition){ - diffLabel = NLS.bind(Messages.GetDiffElementLabel_StereotypeAppliedOnAnElement,labelProvider.getText(((UMLStereotypeApplicationAddition)updateModelElement).getStereotype())); - } - else{ - diffLabel = itemProvider.getString("_UI_UpdateModelElement_type") + " " + updateModelElement.isConflicting(); //$NON-NLS-1$ //$NON-NLS-2$ - } - } else if(context instanceof ModelElementChangeLeftTarget) { //comes from ModelElementChangeLeftTargetItemProvider - //TODO : not tested - final ModelElementChangeLeftTarget operation = (ModelElementChangeLeftTarget)context; - final String targetName = labelProvider.getText(operation.getLeftElement()); - if(operation.isRemote()) { - if(operation.isConflicting()) { - diffLabel = itemProvider.getString("_UI_RemoteRemoveModelElement_conflicting", new Object[]{ targetName }); //$NON-NLS-1$ - } else { - diffLabel = itemProvider.getString("_UI_RemoteRemoveModelElement_type", new Object[]{ targetName }); //$NON-NLS-1$ - } - } else { - diffLabel = itemProvider.getString("_UI_AddModelElement_type", new Object[]{ targetName, }); //$NON-NLS-1$ - } - - } else if(context instanceof ModelElementChangeRightTarget) { //comes from ModelElementChangeRightTargetItemProvider - final ModelElementChangeRightTarget operation = (ModelElementChangeRightTarget)context; - final String targetName = labelProvider.getText(operation.getRightElement()); - if(operation.isRemote()) { - diffLabel = itemProvider.getString("_UI_RemoteAddModelElement_type", new Object[]{ targetName }); //$NON-NLS-1$ - } else { - if(operation.isConflicting()) { - diffLabel = itemProvider.getString("_UI_RemoveModelElement_conflicting", new Object[]{ targetName }); //$NON-NLS-1$ - } else { - diffLabel = itemProvider.getString("_UI_RemoveModelElement_type", new Object[]{ targetName, }); //$NON-NLS-1$ - } - } - - - } else if(context instanceof UpdateReference) { //comes from UpdateReferenceItemProvider - //TODO : not tested - final UpdateReference operation = (UpdateReference)context; - final String elementLabel = labelProvider.getText(operation.getLeftElement()); - final String referenceLabel = AdapterUtils.getItemProviderText(operation.getReference());//TODO : use labelProvider ? - final String leftValueLabel = labelProvider.getText(getLeftValue(operation)); - final String rightValueLabel = labelProvider.getText(getRightValue(operation)); - - if(operation.isRemote()) { - diffLabel = itemProvider.getString("_UI_RemoteUpdateReference_type", new Object[]{ referenceLabel, elementLabel, leftValueLabel, rightValueLabel, }); //$NON-NLS-1$ - } else { - if(operation.isConflicting()) { - diffLabel = itemProvider.getString("_UI_UpdateReference_conflicting", new Object[]{ referenceLabel, elementLabel, rightValueLabel, leftValueLabel, }); //$NON-NLS-1$ - } else { - diffLabel = itemProvider.getString("_UI_UpdateReference_type", new Object[]{ referenceLabel, elementLabel, rightValueLabel, leftValueLabel, }); //$NON-NLS-1$ - } - } - - } else if(context instanceof ReferenceOrderChange) { //comes from ReferenceOrderChangeItemProvider - //TODO not tested - //TODO : useful? - final ReferenceOrderChange referenceOrderChange = (ReferenceOrderChange)context; - diffLabel = itemProvider.getString("_UI_ReferenceOrderChange_type", new Object[]{ referenceOrderChange.getReference().getName() }); //$NON-NLS-1$ - } else if(context instanceof ReferenceChangeLeftTarget) { //comes from ReferenceChangeLeftTargetItemProvider - //TODO : not tested - final ReferenceChangeLeftTarget operation = (ReferenceChangeLeftTarget)context; - - final String valueLabel = labelProvider.getText(operation.getLeftTarget()); - final String referenceLabel = labelProvider.getText(operation.getReference()); - final String elementLabel = labelProvider.getText(operation.getRightElement()); - - if(operation.isRemote()) { - diffLabel = itemProvider.getString("_UI_RemoteRemoveReferenceValue_type", new Object[]{ valueLabel, referenceLabel, elementLabel, }); //$NON-NLS-1$ - } else { - diffLabel = itemProvider.getString("_UI_AddReferenceValue_type", new Object[]{ valueLabel, referenceLabel, elementLabel, }); //$NON-NLS-1$ - } - } else if(context instanceof ReferenceChangeRightTarget) { //comes from ReferenceChangeRightTargetItemProvider - //TODO : not tested - final ReferenceChangeRightTarget operation = (ReferenceChangeRightTarget)context; - - final String valueLabel = labelProvider.getText(operation.getRightTarget()); - final String referenceLabel = labelProvider.getText(operation.getReference()); - final String elementLabel = labelProvider.getText(operation.getLeftElement()); - - if(operation.isRemote()) - diffLabel = itemProvider.getString("_UI_RemoteAddReferenceValue_type", new Object[]{ valueLabel, referenceLabel, elementLabel, }); //$NON-NLS-1$ - else { - diffLabel = itemProvider.getString("_UI_RemoveReferenceValue_type", new Object[]{ valueLabel, referenceLabel, elementLabel, }); //$NON-NLS-1$ - } - } - if(diffLabel == null) { - final String message = NLS.bind("{0} doesn't manage {1}", new Object[]{ this.getClass().getSimpleName(), context.getClass().getSimpleName() });//$NON-NLS-1$ - Activator.log.warn(message); - NotificationBuilder.createAsyncPopup(message).run(); - // in this case the default Label will be displayed - } - return diffLabel; - } - - - /** - * Returns the value of the given operation's target reference for the left element. - * - * @param operation - * The update reference operation for which we need target information. - * @return The value of the given operation's target reference for the left element. - */ - private EObject getLeftValue(final UpdateReference operation) { - final EReference reference = operation.getReference(); - return (EObject)operation.getLeftElement().eGet(reference); - } - - /** - * Returns the value of the given operation's target reference for the right element. - * - * @param operation - * The update reference operation for which we need target information. - * @return The value of the given operation's target reference for the right element. - */ - private EObject getRightValue(final UpdateReference operation) { - final EReference reference = operation.getReference(); - return (EObject)operation.getRightElement().eGet(reference); - } - -} diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/UMLDiffEngine.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/UMLDiffEngine.java deleted file mode 100644 index 152a0b55a99..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/UMLDiffEngine.java +++ /dev/null @@ -1,194 +0,0 @@ -/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.diff.services;
-
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.emf.compare.diff.engine.check.AttributesCheck;
-import org.eclipse.emf.compare.diff.engine.check.ReferencesCheck;
-import org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffGroup;
-import org.eclipse.emf.compare.diff.metamodel.DiffModel;
-import org.eclipse.emf.compare.diff.metamodel.MoveModelElement;
-import org.eclipse.emf.compare.diff.metamodel.UpdateReference;
-import org.eclipse.emf.compare.diff.metamodel.util.DiffSwitch;
-import org.eclipse.emf.compare.match.metamodel.Match2Elements;
-import org.eclipse.emf.compare.match.metamodel.MatchModel;
-import org.eclipse.emf.compare.uml2.diff.UML2DiffEngine;
-import org.eclipse.emf.ecore.EGenericType;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.papyrus.infra.emf.compare.diff.check.FeaturesCheck;
-import org.eclipse.papyrus.infra.emf.compare.diff.check.PapyrusAttributesCheck;
-import org.eclipse.papyrus.infra.emf.compare.diff.utils.PapyrusOptionsAdapter;
-import org.eclipse.papyrus.uml.compare.diff.check.PapyrusUML2ReferencesCheck;
-import org.eclipse.papyrus.uml.compare.diff.internal.utils.UMLDiffElementExtensionBuilder;
-
-public class UMLDiffEngine extends UML2DiffEngine {//GenericDiffEngine {
-
- private DiffSwitch<AbstractDiffExtension> extensionBuilder;
-
- private Map<String, Object> options;
-
- protected FeaturesCheck featuresCheck;
-
- public UMLDiffEngine() {
- this(null);
- }
-
- public UMLDiffEngine(final Map<String, Object> options) {
- this.extensionBuilder = new UMLDiffElementExtensionBuilder();
- this.options = options;
- }
-
- /**
- * This will check if the elements matched by a given {@link Match2Elements} have been moved.
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement} to create if the elements have actually
- * been moved.
- * @param matchElement
- * This contains the mapping information about the elements we need to check for a move.
- */
- protected void checkMoves(DiffGroup root, Match2Elements matchElement) {
- final EObject left = matchElement.getLeftElement();
- final EObject right = matchElement.getRightElement();
-
- if(left instanceof EGenericType || right instanceof EGenericType)
- return;
- if(left.eContainer() != null && right.eContainer() != null && getMatchManager().getMatchedEObject(left.eContainer()) != right.eContainer()) {
- final EStructuralFeature leftFeature = left.eContainingFeature();
- if(this.featuresCheck == null) {
- this.featuresCheck = new FeaturesCheck(getMatchManager(), options);
- }
- if(!this.featuresCheck.shouldBeIgnored(leftFeature) && !this.featuresCheck.shouldBeIgnored(leftFeature, left)) {
- super.checkMoves(root, matchElement);
- }
- }
- }
-
- @Override
- public DiffModel doDiff(MatchModel match, boolean threeWay) {
- DiffModel result = super.doDiff(match, threeWay);
- result = papyrusPostProcess(result);
- addMergeOptions(result);
- return result;
- }
-
-
- /**
- * Attach an adapter containing the merge options to each DiffElement
- *
- * @param diffModel
- * the diffModel
- */
- private void addMergeOptions(final DiffModel diffModel) {
- if(this.options != null) {
- final Iterator<EObject> iter = diffModel.eAllContents();
- while(iter.hasNext()) {
- final EObject current = iter.next();
- if(current instanceof DiffElement) {
- final PapyrusOptionsAdapter adapter = new PapyrusOptionsAdapter(this.options);
- current.eAdapters().add(adapter);
- }
- }
- }
- }
-
- /**
- * Post process default result of Diff.
- * Processes changes stereotypes and tagged values
- *
- * @param diffModel
- * the diff model
- * @return the diff model
- */
- protected DiffModel papyrusPostProcess(DiffModel diffModel) {
- final Iterator<EObject> it = diffModel.eAllContents();
- while(it.hasNext()) {
- DiffElement diffElement = (DiffElement)it.next();
- visitElement(diffModel, diffElement);
- }
- return diffModel;
- }
-
- /**
- * Visit element.
- *
- * @param root
- * the root
- * @param diffElement
- * the diff element
- */
- protected void visitElement(DiffModel root, DiffElement diffElement) {
- AbstractDiffExtension newElement = null;
- if(diffElement instanceof MoveModelElement) {
- newElement = (AbstractDiffExtension)extensionBuilder.doSwitch(diffElement);
- } else if(diffElement instanceof UpdateReference) {
- newElement = (AbstractDiffExtension)extensionBuilder.doSwitch(diffElement);
- }
- if(newElement != null) {
- replaceElement(diffElement, newElement);
- }
- }
-
- /**
- * the newElement hides the old element
- * TODO rename this method to be conpliant with EMF-Compare?
- *
- * @param oldElement
- * @param newElement
- */
- private void replaceElement(final DiffElement oldElement, final AbstractDiffExtension newElement) {
- DiffGroup parent = (DiffGroup)oldElement.eContainer();
- parent.getSubDiffElements().add((DiffElement)newElement);
- ((AbstractDiffExtension)newElement).getHideElements().add(oldElement);
- }
-
- /**
- *
- * @see org.eclipse.emf.compare.diff.engine.GenericDiffEngine#getAttributesChecker()
- *
- * @return
- */
- @Override
- protected AttributesCheck getAttributesChecker() {
- return new PapyrusAttributesCheck(getMatchManager(), getFeatureChecker());
- }
-
- /**
- *
- * @see org.eclipse.emf.compare.uml2.diff.UML2DiffEngine#getReferencesChecker()
- *
- * @return
- */
- @Override
- protected ReferencesCheck getReferencesChecker() {
- return new PapyrusUML2ReferencesCheck(getMatchManager(), getFeatureChecker());
- }
-
- /**
- *
- * @return
- * the feature checker
- */
- protected FeaturesCheck getFeatureChecker() {
- if(this.featuresCheck == null) {
- this.featuresCheck = new FeaturesCheck(getMatchManager(), this.options);
- }
- return this.featuresCheck;
- }
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/UMLDiffService.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/UMLDiffService.java deleted file mode 100644 index 8938f7bc110..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/UMLDiffService.java +++ /dev/null @@ -1,162 +0,0 @@ -/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.diff.services;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.Collection;
-import java.util.Map;
-
-import org.eclipse.emf.compare.diff.engine.IDiffEngine;
-import org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension;
-import org.eclipse.emf.compare.diff.metamodel.DiffModel;
-import org.eclipse.emf.compare.diff.service.DiffService;
-import org.eclipse.emf.compare.match.metamodel.MatchModel;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.infra.tools.util.ReflectHelper;
-import org.eclipse.papyrus.uml.compare.diff.Activator;
-
-
-
-public class UMLDiffService {
-
- private static Method fillRequiredDifferencesMethod = null;
-
- /**
- * Utility classes don't need to (and shouldn't) be instantiated.
- */
- private UMLDiffService() {
- // prevents instantiation
- }
-
-
-
- /**
- * Return a diffmodel created using the match model. This implementation is a generic and simple one.
- *
- * @param match
- * the matching model
- * @param threeWay
- * <code>True</code> if we're computing a three way comparison, <code>False</code> otherwise.
- * @return the corresponding diff model
- */
- public static DiffModel doDiff(MatchModel match, boolean threeWay) {
- return doDiff(match, threeWay, null);
- }
-
- /**
- * Return a diffmodel created using the match model. This implementation is a generic and simple one.
- *
- * @param match
- * the matching model
- * @param threeWay
- * <code>True</code> if we're computing a three way comparison, <code>False</code> otherwise.
- * @param options
- * the options for the diff
- * @return the corresponding diff model
- */
- public static DiffModel doDiff(MatchModel match, boolean threeWay, final Map<String, Object> options) {
- // final IDiffEngine engine = getBestDiffEngine(match);
- final IDiffEngine engine = new UMLDiffEngine(options); //TODO verify that it is the correct diff engine for UML
- final DiffModel diff = engine.doDiff(match, threeWay);
-
- final Collection<AbstractDiffExtension> extensions = DiffService.getCorrespondingDiffExtensions(match);
- for(final AbstractDiffExtension ext : extensions) {
- if(ext != null) {
- ext.visit(diff);
- }
- }
-
- engine.reset();
-
- fillRequiredDifferences(diff);
- //clean the diff
-// cleanDiff(diff);
-
- return diff;
- }
-
-
-
-// private static void cleanDiff(final DiffModel diffModel) {
-// EList<DiffElement> differences = diffModel.getDifferences();
-//
-// final List<DiffElement> toRemove = new ArrayList<DiffElement>();
-// for(DiffElement current : differences) {
-// if(current instanceof MoveModelElement) {//appears when we do a comparison between 2 elements of the same model (name change for example)
-// EObject leftTarget = ((MoveModelElement)current).getLeftTarget();
-// EObject rightTarget = ((MoveModelElement)current).getRightTarget();
-// if(leftTarget == null && rightTarget == null) {
-// toRemove.add(current);
-// }
-// }
-// }
-// for(DiffElement current : toRemove) {
-// EcoreUtil.remove(current);
-// }
-//
-// differences = diffModel.getOwnedElements();
-// if(differences.size() == 1 && differences.get(0) instanceof DiffGroup) {
-// DiffGroup group = (DiffGroup)differences.get(0);
-// if(group.getSubDiffElements().size() == 1 && group.getSubDiffElements().get(0) instanceof DiffGroup) {
-// DiffGroup group2 = (DiffGroup)group.getSubDiffElements().get(0);
-// if(!group2.isConflicting() && group2.getSubDiffElements().size() == 1) {
-// DiffGroup group3 = (DiffGroup)group.getSubDiffElements().get(0);
-// if(!group2.isConflicting() && group2.getSubDiffElements().size() == 1) {
-// //we should remove its parent!
-// // diffModel.getOwnedElements().add(group2);
-// // EcoreUtil.remove(group);
-// }
-// }
-// }
-// }
-// // EList<DiffElement> differences2 = diffModel.getDifferences();
-// // if(differences2.size() == 1) {
-// // DiffElement el = differences2.get(0);
-// // if(el instanceof DiffGroup) {
-// // DiffGroup group = (DiffGroup)el;
-// // if(group.getSubDiffElements().size() == 1 && group.getSubDiffElements().get(0) instanceof DiffGroup) {
-// // group = (DiffGroup)group.getSubDiffElements().get(0);
-// // int i = 0;
-// // i++;
-// //
-// // }
-// // }
-// // }
-// }
-
- //TODO write a JUnit test to be sue that the method called reflexively is always available
- private static void fillRequiredDifferences(final DiffModel diff) {
- if(fillRequiredDifferencesMethod == null) {
- try {
- fillRequiredDifferencesMethod = ReflectHelper.getMethod(DiffService.class, "fillRequiredDifferences", new Class<?>[]{ EObject.class });
- } catch (SecurityException e) {
- Activator.log.error(e);
- } catch (NoSuchMethodException e) {
- Activator.log.error(e);
- }
- }
- final Object[] parameters = new Object[1];
- parameters[0] = diff;
- try {
- fillRequiredDifferencesMethod.invoke(null, parameters);
- } catch (IllegalArgumentException e) {
- Activator.log.error(e);
- } catch (IllegalAccessException e) {
- Activator.log.error(e);
- } catch (InvocationTargetException e) {
- Activator.log.error(e);
- }
- }
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/nested/NestedMatchService.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/nested/NestedMatchService.java deleted file mode 100644 index 19235d99e6e..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/nested/NestedMatchService.java +++ /dev/null @@ -1,59 +0,0 @@ -/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.diff.services.nested;
-
-import java.util.Map;
-
-import org.eclipse.emf.compare.match.engine.IMatchEngine;
-import org.eclipse.emf.compare.match.metamodel.MatchModel;
-import org.eclipse.emf.ecore.EObject;
-
-//replace MatchService
-public class NestedMatchService {
-
- /**
- * Utility classes don't need to (and shouldn't) be instantiated.
- */
- private NestedMatchService() {
- // prevents instantiation
- }
-
- /**
- * Matches three objects along with their content, then return the corresponding match model.
- *
- * @param leftObject
- * Left (local) of the three objects to get compared.
- * @param rightObject
- * Right (latest from repository) of the three objects to compare.
- * @param ancestor
- * Common ancestor of the two others.
- * @param options
- * Options to tweak the matching procedure. <code>null</code> or an empty map will result in
- * the default options to be used.
- * @return {@link MatchModel} for these three objects' comparison.
- * @throws InterruptedException
- * Thrown if the matching is interrupted somehow.
- * @see org.eclipse.emf.compare.match.MatchOptions
- * @see IMatchEngine#contentMatch(EObject, EObject, EObject, Map)
- *
- */
- public static MatchModel doContentMatch(EObject leftObject, EObject rightObject, Map<String, Object> options) throws InterruptedException {
- final IMatchEngine engine = new UMLMatchEngine();
- final MatchModel result = engine.contentMatch(leftObject, rightObject, options);
- engine.reset();
- return result;
- }
-
-
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/nested/NestedMergeUtils.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/nested/NestedMergeUtils.java deleted file mode 100644 index 4b7418bdcc6..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/nested/NestedMergeUtils.java +++ /dev/null @@ -1,56 +0,0 @@ -/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.diff.services.nested;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.compare.match.MatchOptions;
-import org.eclipse.emf.compare.match.engine.GenericMatchScopeProvider;
-import org.eclipse.emf.compare.util.EMFCompareMap;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.papyrus.infra.emf.compare.diff.utils.PapyrusCompareOptions;
-
-
-public class NestedMergeUtils {
-
- public static final Map<String, Object> getMergeOptions(final IProgressMonitor monitor, final EObject left, final EObject right) {
- final Map<String, Object> options = new EMFCompareMap<String, Object>();
- Assert.isNotNull(left);
- Assert.isNotNull(right);
- options.put(MatchOptions.OPTION_PROGRESS_MONITOR, monitor);
- options.put(MatchOptions.OPTION_IGNORE_ID, Boolean.TRUE);
- options.put(MatchOptions.OPTION_IGNORE_XMI_ID, Boolean.TRUE);
- options.put(MatchOptions.OPTION_MATCH_SCOPE_PROVIDER, new GenericMatchScopeProvider(left, right));
-
-
- //---------begin of bug 377154
- //when we compare 2 elements owned by the same file, we don't verify their container
-
- final Map<EStructuralFeature, List<EObject>> featuresOptions = new HashMap<EStructuralFeature, List<EObject>>();
- List<EObject> objects = new ArrayList<EObject>();
- objects.add(left);
- objects.add(right);
- featuresOptions.put(left.eContainingFeature(), objects);
- featuresOptions.put(right.eContainingFeature(), objects);
- options.put(PapyrusCompareOptions.KEY_IGNORE_CHANGES_ON_FEATURES_FOR, featuresOptions);
- //---------end of bug 377154
- return options;
- }
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/nested/NestedUMLStereotypeApplicationMatchScope.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/nested/NestedUMLStereotypeApplicationMatchScope.java deleted file mode 100644 index 189020080bb..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/nested/NestedUMLStereotypeApplicationMatchScope.java +++ /dev/null @@ -1,75 +0,0 @@ -/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.diff.services.nested;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.compare.match.engine.DefaultMatchScope;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.uml2.uml.util.UMLUtil;
-
-/**
- *
- * This class allows to know which stereotype application should be known by the element to do the comparison
- * see bug 384490: [UML Compare] Comparison between stereotyped elements doesn't work in the nested Compare Editor
- */
-public class NestedUMLStereotypeApplicationMatchScope extends DefaultMatchScope {
-
- /**
- * The stereotype application known by the scope
- */
- private List<EObject> stereotypeApplication;
-
- /**
- *
- * Constructor.
- *
- * @param el
- * @param stereotypeApplication
- */
- public NestedUMLStereotypeApplicationMatchScope(final EObject el, final List<EObject> stereotypeApplication) {
- super(el);
- this.stereotypeApplication = new ArrayList<EObject>(stereotypeApplication);
- }
-
- /**
- *
- * Constructor.
- *
- * @param el
- * the element
- * @param stereotypeApplication
- * the list of the stereotype application known by this scope
- */
- public NestedUMLStereotypeApplicationMatchScope(final Resource res, final List<EObject> stereotypeApplication){
- super(res);
- this.stereotypeApplication = new ArrayList<EObject>(stereotypeApplication);
- }
- /**
- *
- * @see org.eclipse.emf.compare.match.engine.GenericMatchScope#isInScope(org.eclipse.emf.ecore.EObject)
- *
- * @param eObject
- * @return
- */
- @Override
- public boolean isInScope(EObject eObject) {
- if(UMLUtil.getStereotype(eObject) != null) {
- return stereotypeApplication.contains(eObject);
- }
- return super.isInScope(eObject);
- }
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/nested/NestedUMLStereotypeApplicationMatchScopeProvider.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/nested/NestedUMLStereotypeApplicationMatchScopeProvider.java deleted file mode 100644 index c5b5694c1d9..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/nested/NestedUMLStereotypeApplicationMatchScopeProvider.java +++ /dev/null @@ -1,153 +0,0 @@ -/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.diff.services.nested;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.compare.match.engine.GenericMatchScope;
-import org.eclipse.emf.compare.match.engine.IMatchScope;
-import org.eclipse.emf.compare.match.engine.IMatchScopeProvider;
-import org.eclipse.emf.compare.match.filter.IResourceFilter;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.uml2.uml.Element;
-
-/**
- *
- * Created to resolve the bug 384490: [UML Compare] Comparison between stereotyped elements doesn't work in the nested Compare Editor
- *
- */
-public class NestedUMLStereotypeApplicationMatchScopeProvider implements IMatchScopeProvider {
-
- /**
- * The match scope used for the left side of comparison.
- *
- * @since 1.3
- */
- final protected IMatchScope leftScope;
-
- /**
- * The match scope used for the right side of comparison.
- *
- * @since 1.3
- */
- final protected IMatchScope rightScope;
-
- /**
- * The match scope used for the ancestor side of comparison.
- *
- * @since 1.3
- */
- protected IMatchScope ancestorScope;
-
- /**
- * Constructs a left and right {@link GenericMatchScope} with the given {@link EObject}s. No ancestor
- * scope will be created, so calls to {@link #getAncestorScope()} will return <code>null</code>.
- *
- * @param leftObject
- * the {@link EObject}, which will be used to construct the left scope
- * @param rightObject
- * the {@link EObject}, which will be used to construct the right scope
- */
- public NestedUMLStereotypeApplicationMatchScopeProvider(EObject leftObject, EObject rightObject) {
- final List<EObject> leftSte = new ArrayList<EObject>();
- final List<EObject> rightSte = new ArrayList<EObject>();
- if(leftObject instanceof Element) {
- leftSte.addAll(((Element)leftObject).getStereotypeApplications());
- if(((Element)leftObject).getNearestPackage() != null) {
- leftSte.addAll(((Element)leftObject).getNearestPackage().getAllProfileApplications());
- }
- }
- if(rightObject instanceof Element) {
- rightSte.addAll(((Element)rightObject).getStereotypeApplications());
- if(((Element)rightObject).getNearestPackage() != null) {
- rightSte.addAll(((Element)rightObject).getNearestPackage().getAllProfileApplications());
- }
- }
- if(leftObject.eResource() != null) {
- this.leftScope = new NestedUMLStereotypeApplicationMatchScope(leftObject.eResource(), leftSte);
- } else {
- this.leftScope = new NestedUMLStereotypeApplicationMatchScope(leftObject, leftSte);
- }
-
- if(rightObject.eResource() != null) {
- this.rightScope = new NestedUMLStereotypeApplicationMatchScope(rightObject.eResource(), rightSte);
- } else {
- this.rightScope = new NestedUMLStereotypeApplicationMatchScope(rightObject, rightSte);
- }
- }
-
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.match.engine.IMatchScopeProvider#getAncestorScope()
- */
- public IMatchScope getAncestorScope() {
- return ancestorScope;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.match.engine.IMatchScopeProvider#getLeftScope()
- */
- public IMatchScope getLeftScope() {
- return leftScope;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.match.engine.IMatchScopeProvider#getRightScope()
- */
- public IMatchScope getRightScope() {
- return rightScope;
- }
-
- /**
- * Allows to apply an {@link IResourceFilter} to the contained scopes, to reduce them respectively. This
- * will only have an effect, if this scope provider was instantiated using either a {@link Resource} or a {@link ResourceSet}, but not in case an
- * {@link EObject} was used.
- *
- * @param filter
- * the filter to apply to the resources of the left, right and (if provided) ancestor scope.
- */
- @SuppressWarnings("unchecked")
- public void applyResourceFilter(IResourceFilter filter) {
- if(ancestorScope != null) {
- applyExternalFilter(filter, ((GenericMatchScope)leftScope).getResourcesInScope(), ((GenericMatchScope)rightScope).getResourcesInScope(), ((GenericMatchScope)ancestorScope).getResourcesInScope());
- } else {
- applyExternalFilter(filter, ((GenericMatchScope)leftScope).getResourcesInScope(), ((GenericMatchScope)rightScope).getResourcesInScope());
- }
- }
-
- /**
- * Applies the given filter to the list of resources.
- *
- * @param filter
- * the filter to apply.
- * @param resources
- * the list of resources to be filtered (in place).
- */
- private static void applyExternalFilter(IResourceFilter filter, List<Resource>... resources) {
- if(resources.length == 2) {
- filter.filter(resources[0], resources[1]);
- } else {
- filter.filter(resources[0], resources[1], resources[2]);
- }
- }
-
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/nested/UMLDiffEngine.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/nested/UMLDiffEngine.java deleted file mode 100644 index b3ff61e081a..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/nested/UMLDiffEngine.java +++ /dev/null @@ -1,41 +0,0 @@ -/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.diff.services.nested;
-
-import org.eclipse.emf.compare.diff.metamodel.DiffGroup;
-import org.eclipse.emf.compare.match.metamodel.Match2Elements;
-import org.eclipse.papyrus.uml.compare.diff.services.standalone.UMLStandaloneDiffEngine;
-
-/**
- *
- * A specific DiffEngine for the Nested UML Compare Editor
- * see bug 377154
- */
-//TODO verify the upper class for UML models
-public class UMLDiffEngine extends UMLStandaloneDiffEngine {
-
- /**
- *
- * @see org.eclipse.emf.compare.diff.engine.GenericDiffEngine#checkContainmentUpdate(org.eclipse.emf.compare.diff.metamodel.DiffGroup,
- * org.eclipse.emf.compare.match.metamodel.Match2Elements)
- *
- * @param current
- * @param matchElement
- */
- protected void checkContainmentUpdate(DiffGroup current, Match2Elements matchElement) {
- //when we compare 2 elements owned by the same file, we don't verify their container
- //see bug 377154
- }
-
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/nested/UMLDiffService.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/nested/UMLDiffService.java deleted file mode 100644 index 3745213edae..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/nested/UMLDiffService.java +++ /dev/null @@ -1,159 +0,0 @@ -/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.diff.services.nested;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.compare.diff.engine.IDiffEngine;
-import org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffGroup;
-import org.eclipse.emf.compare.diff.metamodel.DiffModel;
-import org.eclipse.emf.compare.diff.metamodel.MoveModelElement;
-import org.eclipse.emf.compare.diff.service.DiffService;
-import org.eclipse.emf.compare.match.metamodel.MatchModel;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.papyrus.infra.tools.util.ReflectHelper;
-import org.eclipse.papyrus.uml.compare.diff.Activator;
-
-/**
- *
- * A specific DiffService for the Nested UML Compare Editor
- *
- * @see DiffService
- * @see bug 377154
- */
-//TODO ask to EMF-Compare to open their API
-public class UMLDiffService {
-
- private static Method fillRequiredDifferencesMethod = null;
-
- /**
- * Utility classes don't need to (and shouldn't) be instantiated.
- */
- private UMLDiffService() {
- // prevents instantiation
- }
-
-
-
- /**
- * Return a diffmodel created using the match model. This implementation is a generic and simple one.
- *
- * @param match
- * the matching model
- * @param threeWay
- * <code>True</code> if we're computing a three way comparison, <code>False</code> otherwise.
- * @return the corresponding diff model
- */
- public static DiffModel doDiff(MatchModel match, boolean threeWay) {
- // final IDiffEngine engine = getBestDiffEngine(match);
- final IDiffEngine engine = new UMLDiffEngine(); //TODO verify that it is the correct diff engine for UML
- final DiffModel diff = engine.doDiff(match, threeWay);
-
- final Collection<AbstractDiffExtension> extensions = DiffService.getCorrespondingDiffExtensions(match);
- for(final AbstractDiffExtension ext : extensions) {
- if(ext != null) {
- ext.visit(diff);
- }
- }
-
- engine.reset();
-
- fillRequiredDifferences(diff);
- //clean the diff
- cleanDiff(diff);
-
- return diff;
- }
-
- private static void cleanDiff(final DiffModel diffModel) {
- EList<DiffElement> differences = diffModel.getDifferences();
-
- final List<DiffElement> toRemove = new ArrayList<DiffElement>();
- for(DiffElement current : differences) {
- if(current instanceof MoveModelElement) {//appears when we do a comparison between 2 elements of the same model (name change for example)
- EObject leftTarget = ((MoveModelElement)current).getLeftTarget();
- EObject rightTarget = ((MoveModelElement)current).getRightTarget();
- if(leftTarget == null && rightTarget == null) {
- toRemove.add(current);
- }
- }
- }
- for(DiffElement current : toRemove) {
- EcoreUtil.remove(current);
- }
-
- differences = diffModel.getOwnedElements();
- if(differences.size() == 1 && differences.get(0) instanceof DiffGroup) {
- DiffGroup group = (DiffGroup)differences.get(0);
- if(group.getSubDiffElements().size() == 1 && group.getSubDiffElements().get(0) instanceof DiffGroup) {
- DiffGroup group2 = (DiffGroup)group.getSubDiffElements().get(0);
- if(!group2.isConflicting() && group2.getSubDiffElements().size() == 1) {
- DiffGroup group3 = (DiffGroup)group.getSubDiffElements().get(0);
- if(!group2.isConflicting() && group2.getSubDiffElements().size() == 1) {
- //we should remove its parent!
- // diffModel.getOwnedElements().add(group2);
- // EcoreUtil.remove(group);
- }
- }
- }
- }
- int i = 0;
- i++;
- // EList<DiffElement> differences2 = diffModel.getDifferences();
- // if(differences2.size() == 1) {
- // DiffElement el = differences2.get(0);
- // if(el instanceof DiffGroup) {
- // DiffGroup group = (DiffGroup)el;
- // if(group.getSubDiffElements().size() == 1 && group.getSubDiffElements().get(0) instanceof DiffGroup) {
- // group = (DiffGroup)group.getSubDiffElements().get(0);
- // int i = 0;
- // i++;
- //
- // }
- // }
- // }
- }
-
- //TODO write a JUnit test to be sue that the method called reflexively is always available
- private static void fillRequiredDifferences(final DiffModel diff) {
- if(fillRequiredDifferencesMethod == null) {
- try {
- fillRequiredDifferencesMethod = ReflectHelper.getMethod(DiffService.class, "fillRequiredDifferences", new Class<?>[]{ EObject.class });
- } catch (SecurityException e) {
- Activator.log.error(e);
- } catch (NoSuchMethodException e) {
- Activator.log.error(e);
- }
- }
- final Object[] parameters = new Object[1];
- parameters[0] = diff;
- try {
- fillRequiredDifferencesMethod.invoke(null, parameters);
- } catch (IllegalArgumentException e) {
- Activator.log.error(e);
- } catch (IllegalAccessException e) {
- Activator.log.error(e);
- } catch (InvocationTargetException e) {
- Activator.log.error(e);
- }
- }
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/nested/UMLMatchEngine.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/nested/UMLMatchEngine.java deleted file mode 100644 index 66fd4fcae44..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/nested/UMLMatchEngine.java +++ /dev/null @@ -1,306 +0,0 @@ -/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.diff.services.nested;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.emf.compare.FactoryException;
-import org.eclipse.emf.compare.match.MatchOptions;
-import org.eclipse.emf.compare.match.engine.AbstractSimilarityChecker;
-import org.eclipse.emf.compare.match.engine.internal.GenericMatchEngineToCheckerBridge;
-import org.eclipse.emf.compare.match.internal.statistic.NameSimilarity;
-import org.eclipse.emf.compare.match.metamodel.Match2Elements;
-import org.eclipse.emf.compare.match.metamodel.MatchElement;
-import org.eclipse.emf.compare.match.metamodel.MatchFactory;
-import org.eclipse.emf.compare.match.metamodel.MatchModel;
-import org.eclipse.emf.compare.match.metamodel.Side;
-import org.eclipse.emf.compare.match.metamodel.UnmatchElement;
-import org.eclipse.emf.compare.match.metamodel.provider.MatchEditPlugin;
-import org.eclipse.emf.compare.util.EMFCompareMap;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.uml.compare.diff.Activator;
-import org.eclipse.papyrus.uml.compare.diff.services.standalone.UMLStandaloneMatchEngine;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Stereotype;
-import org.eclipse.uml2.uml.util.UMLUtil;
-
-//TODO verify the super class for UML models
-/**
- *
- * A specific match engine for the Nested UML Compare Editor
- *
- * @see bug 377154
- */
-public class UMLMatchEngine extends UMLStandaloneMatchEngine {//GenericMatchEngine {
-
- /** the left object to compare */
- protected EObject leftObject;
-
- /** the right object to compare */
- protected EObject rightObject;
-
- /**
- *
- * @see org.eclipse.emf.compare.match.engine.GenericMatchEngine#contentMatch(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject,
- * java.util.Map)
- *
- * @param leftObject
- * @param rightObject
- * @param optionMap
- * @return
- */
- @Override
- public MatchModel contentMatch(final EObject leftObject, final EObject rightObject, final Map<String, Object> optionMap) {
- this.leftObject = leftObject;
- this.rightObject = rightObject;
- final MatchModel matchModel = super.contentMatch(leftObject, rightObject, optionMap);
- if(this.leftObject.eResource() != null && this.rightObject.eResource() != null) {
- completeMatchModelWithUMLDifferences(matchModel, leftObject, rightObject, optionMap);
- completeMatchWithStereotypeApplications(matchModel, leftObject, rightObject);
- }
- return matchModel;
- }
-
- /**
- *
- * @param matchModel
- * the match model
- * @param leftObject
- * the initial left element used for the comparison
- * @param rightObject
- * the initial right element used for the comparison
- *
- */
- protected void completeMatchWithStereotypeApplications(MatchModel matchModel, EObject leftObject, EObject rightObject) {
- //we check the stereotype application on the compared elements
- AbstractSimilarityChecker checker = prepareChecker();
- final List<MatchElement> supplementaryMatchElement = new ArrayList<MatchElement>();
- final List<UnmatchElement> supplementaryUnmatchedElement = new ArrayList<UnmatchElement>();
-
- if(leftObject instanceof Element && rightObject instanceof Element) {
- List[] newValue = getAdditionalStereotypeApplicationModelElement(checker, (Element)leftObject, (Element)rightObject);
- supplementaryMatchElement.addAll(newValue[0]);
- supplementaryUnmatchedElement.addAll(newValue[1]);
- }
-
- //we check the stereotype application for all others matching children
- //for(final MatchElement current : matchModel.getMatchedElements().get(0).getSubMatchElements()) {
- for(final MatchElement current : matchModel.getMatchedElements()){
- if(current instanceof Match2Elements) {
- List[] newValue =crossMatchingElement(checker, current);
- supplementaryMatchElement.addAll(newValue[0]);
- supplementaryUnmatchedElement.addAll(newValue[1]);
- }
- }
- matchModel.getMatchedElements().get(0).getSubMatchElements().addAll(supplementaryMatchElement);
- matchModel.getUnmatchedElements().addAll(supplementaryUnmatchedElement);
- }
-
- protected List<?>[] crossMatchingElement(final AbstractSimilarityChecker checker, final MatchElement el){
- final List<MatchElement> supplementaryMatchedElementElement = new ArrayList<MatchElement>();
- final List<UnmatchElement> supplementaryUnmatchedElement = new ArrayList<UnmatchElement>();
- if(el instanceof Match2Elements) {
- final EObject left = ((Match2Elements)el).getLeftElement();
- final EObject right = ((Match2Elements)el).getRightElement();
- if(left instanceof Element && right instanceof Element) {
- List[] newValue = getAdditionalStereotypeApplicationModelElement(checker, (Element)left, (Element)right);
- supplementaryMatchedElementElement.addAll(newValue[0]);
- supplementaryUnmatchedElement.addAll(newValue[1]);
- }
- for(final MatchElement current : el.getSubMatchElements()){
- List[] newValue = crossMatchingElement(checker, current);
- supplementaryMatchedElementElement.addAll(newValue[0]);
- supplementaryUnmatchedElement.addAll(newValue[1]);
- }
- }
- List<?>[] value = new List<?>[2];
- value[0] = supplementaryMatchedElementElement;
- value[1] = supplementaryUnmatchedElement;
- return value;
- }
-
- /**
- *
- * @param checker
- * the checker
- * @param left
- * the left element
- * @param right
- * the right element
- * @return
- * an array with 2 list : the first one contains the matchedelements to add and the 2nd one contains the unmatched elements to add
- */
- protected List<?>[] getAdditionalStereotypeApplicationModelElement(final AbstractSimilarityChecker checker, final Element left, final Element right) {
- final List<MatchElement> supplementaryMatchedElementElement = new ArrayList<MatchElement>();
- final List<UnmatchElement> supplementaryUnmatchedElement = new ArrayList<UnmatchElement>();
- final Set<Stereotype> allAppliedStereotypes = new HashSet<Stereotype>();
- allAppliedStereotypes.addAll(left.getAppliedStereotypes());
- allAppliedStereotypes.addAll(right.getAppliedStereotypes());
- for(final Stereotype ste : allAppliedStereotypes) {
- final EObject rightApplication = ((Element)right).getStereotypeApplication(ste);
- final EObject leftApplication = ((Element)left).getStereotypeApplication(ste);
- if(rightApplication != null && leftApplication != null) {
- Match2Elements newMatch = MatchFactory.eINSTANCE.createMatch2Elements();
- newMatch.setLeftElement(leftApplication);
- newMatch.setRightElement(rightApplication);
- double metric = 0.0;
- try {
- metric = checker.absoluteMetric(leftApplication, rightApplication);
- } catch (FactoryException e) {
- Activator.log.error(e);
- }
- newMatch.setSimilarity(metric);
- supplementaryMatchedElementElement.add(newMatch);
- } else if(leftApplication == null) {
- UnmatchElement unmatch = MatchFactory.eINSTANCE.createUnmatchElement();
- unmatch.setConflicting(false);
- unmatch.setElement(rightApplication);
- unmatch.setSide(Side.RIGHT);
- supplementaryUnmatchedElement.add(unmatch);
- } else if(rightApplication == null) {
- UnmatchElement unmatch = MatchFactory.eINSTANCE.createUnmatchElement();
- unmatch.setConflicting(false);
- unmatch.setElement(leftApplication);
- unmatch.setSide(Side.LEFT);
- supplementaryUnmatchedElement.add(unmatch);
- }
- }
- List<?>[] value = new List<?>[2];
- value[0] = supplementaryMatchedElementElement;
- value[1] = supplementaryUnmatchedElement;
- return value;
- }
-
- /**
- * This method has been developped to correct the bug 384490: [UML Compare] Comparison between stereotyped elements doesn't work in the nested
- * Compare Editor
- *
- * @param matchModel
- * @param leftObject
- * @param rightObject
- * @param optionMap
- */
- protected void completeMatchModelWithUMLDifferences(final MatchModel matchModel, final EObject leftObject, final EObject rightObject, final Map<String, Object> optionMap) {
- /*
- * the matchModel should have LeftRoot and rightRoot in order to be able to do add the copied stereotype
- * to the resource -> see mergers :
- * org.eclipse.papyrus.infra.emf.compare.diff.internal.merger.ModelElementChangeLeftTargetTransactionalMerger.getDoUndoInTargetCommand(
- * TransactionalEditingDomain)
- * org.eclipse.papyrus.infra.emf.compare.diff.internal.merger.ModelElementChangeRightTargetTransactionalMerger.getDoApplyInOriginCommand(
- * TransactionalEditingDomain)
- */
- if(matchModel.getLeftRoots().size() == 0 && matchModel.getRightRoots().size() == 0) {
- matchModel.getLeftRoots().addAll(leftObject.eResource().getContents());
- matchModel.getLeftRoots().add(0, leftObject);
- matchModel.getRightRoots().addAll(rightObject.eResource().getContents());
- matchModel.getRightRoots().add(0, rightObject);
- }
-
- //we do a resourceMatch to get the stereotypeApplication differences
- final Map<String, Object> stereotypeOptions = new EMFCompareMap<String, Object>(optionMap);
- stereotypeOptions.put(MatchOptions.OPTION_MATCH_SCOPE_PROVIDER, new NestedUMLStereotypeApplicationMatchScopeProvider(leftObject, rightObject));
- MatchModel steMatchModel = null;
- try {
- steMatchModel = super.resourceMatch(leftObject.eResource(), rightObject.eResource(), stereotypeOptions);
- } catch (InterruptedException e) {
- Activator.log.error(e);
- }
-
- if(steMatchModel != null) {//null when there is no diff...
- final List<UnmatchElement> unmatchedElementToAdd = new ArrayList<UnmatchElement>();
- for(final UnmatchElement current : steMatchModel.getUnmatchedElements()) {
- final EObject stereotypeApplication = UMLUtil.getBaseElement(current.getElement());
- if(stereotypeApplication != null) {
- unmatchedElementToAdd.add(current);
- }
- }
- if(!unmatchedElementToAdd.isEmpty()) {
- matchModel.getUnmatchedElements().addAll(unmatchedElementToAdd);
- }
- }
- }
-
- /**
- *
- * @param sourceElement
- * a uml element
- * @param stereotypedElement
- * a stereotyped element
- * @return
- * <code>true</code> if the stereotyped element is a subelement of the uml element
- */
- protected boolean isRequiredByTheDiff(final Element sourceElement, Element stereotypedElement) {
- EObject container = stereotypedElement;
- while(container != null) {
- if(container == sourceElement) {
- return true;
- }
- container = container.eContainer();
- }
- return false;
- }
-
- /**
- *
- * @see org.eclipse.emf.compare.match.engine.GenericMatchEngine#prepareChecker()
- *
- * @return
- */
- protected AbstractSimilarityChecker prepareChecker() {
- AbstractSimilarityChecker checker = null;
- GenericMatchEngineToCheckerBridge bridge = new UMLGenericMatchEngineToCheckerBridge();
- Assert.isNotNull(leftObject);
- Assert.isNotNull(rightObject);
- checker = new UMLSimilarityChecker(filter, bridge, leftObject, rightObject);
- return checker;
- }
-
-
- /**
- *
- * Duplicate code from GenericMatchEngine
- *
- */
- private class UMLGenericMatchEngineToCheckerBridge extends GenericMatchEngineToCheckerBridge {
-
- @Override
- public double contentSimilarity(EObject obj1, EObject obj2) throws FactoryException {
- double similarity = 0d;
- try {
-
- similarity = NameSimilarity.nameSimilarityMetric(NameSimilarity.findName(obj1), NameSimilarity.findName(obj2));
- } catch (final FactoryException e) {
- // fails silently, will return a similarity of 0d
- }
- return similarity;
- }
-
- @Override
- public double nameSimilarity(EObject obj1, EObject obj2) {
- double similarity = 0d;
- try {
- similarity = NameSimilarity.nameSimilarityMetric(NameSimilarity.contentValue(obj1), NameSimilarity.contentValue(obj2));
- } catch (FactoryException e) {
- // fails silently, will return a similarity of 0d
- }
- return similarity;
- }
-
- }
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/nested/UMLSimilarityChecker.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/nested/UMLSimilarityChecker.java deleted file mode 100644 index ea8d7623d68..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/nested/UMLSimilarityChecker.java +++ /dev/null @@ -1,90 +0,0 @@ -/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.diff.services.nested;
-
-import org.eclipse.emf.compare.FactoryException;
-import org.eclipse.emf.compare.match.engine.internal.DistinctEcoreSimilarityChecker;
-import org.eclipse.emf.compare.match.engine.internal.GenericMatchEngineToCheckerBridge;
-import org.eclipse.emf.compare.match.statistic.MetamodelFilter;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.util.UMLUtil;
-
-//TODO : verify the upper class for UML
-/**
- *
- * A specific similarity checker for the Nested UML Compare Editor
- *
- * @see bug 377154
- */
-public class UMLSimilarityChecker extends DistinctEcoreSimilarityChecker {
-
- /** the left object to compare */
- private final EObject rootLeft;
-
- /** the right object to compare */
- private final EObject rootRight;
-
- /**
- *
- * Constructor.
- *
- * @param filter
- * @param bridge
- * @param left
- * the left object to compare
- * @param right
- * the right object to compare
- */
- public UMLSimilarityChecker(final MetamodelFilter filter, final GenericMatchEngineToCheckerBridge bridge, final EObject left, final EObject right) {
- super(filter, bridge);
- this.rootLeft = left;
- this.rootRight = right;
- }
-
- /**
- *
- * @see org.eclipse.emf.compare.match.engine.internal.DistinctEcoreSimilarityChecker#isSimilar(org.eclipse.emf.ecore.EObject,
- * org.eclipse.emf.ecore.EObject)
- *
- * @param obj1
- * @param obj2
- * @return
- * @throws FactoryException
- */
- @Override
- public boolean isSimilar(final EObject obj1, final EObject obj2) throws FactoryException {
-
- /**
- * We consider that the compared element are always similar (but there names can be different!)
- */
- if(obj1 == rootLeft || obj1 == rootRight) {
- if(obj2 == rootLeft || obj2 == rootRight) {
- return true;
- }
- }
- //if the 2 elements are stereotypes applications, they are similar if the elements on which they are applied are similar
- final Element base1 = UMLUtil.getBaseElement(obj1);
- final Element base2 = UMLUtil.getBaseElement(obj2);
- if(base1 != null && base2 != null) {
- final EClass eClass1 = obj1.eClass();
- final EClass eClass2 = obj2.eClass();
- if(eClass1 == eClass2) {
- return isSimilar(base1, base2);
- }
- }
- return super.isSimilar(obj1, obj2);
- }
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/standalone/StandaloneMergeUtils.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/standalone/StandaloneMergeUtils.java deleted file mode 100644 index 2e48af3a741..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/standalone/StandaloneMergeUtils.java +++ /dev/null @@ -1,37 +0,0 @@ -/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.diff.services.standalone;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.compare.match.MatchOptions;
-import org.eclipse.emf.compare.match.engine.DefaultMatchScopeProvider;
-import org.eclipse.emf.ecore.EObject;
-
-
-public class StandaloneMergeUtils {
-
- public static final Map<String, Object> getMergeOptions(final IProgressMonitor monitor, final EObject left, final EObject right) {
- final Map<String, Object> options = new HashMap<String, Object>();
- if(monitor != null) {
- options.put(MatchOptions.OPTION_PROGRESS_MONITOR, monitor);
- }
- if(left != null && right != null) {
- options.put(MatchOptions.OPTION_MATCH_SCOPE_PROVIDER, new DefaultMatchScopeProvider(left.eResource(), right.eResource()));
- }
- return options;
- }
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/standalone/UMLStandaloneDiffEngine.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/standalone/UMLStandaloneDiffEngine.java deleted file mode 100644 index fc89d5818fe..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/standalone/UMLStandaloneDiffEngine.java +++ /dev/null @@ -1,170 +0,0 @@ -/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.diff.services.standalone;
-
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.emf.compare.diff.engine.check.AttributesCheck;
-import org.eclipse.emf.compare.diff.engine.check.ReferencesCheck;
-import org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffGroup;
-import org.eclipse.emf.compare.diff.metamodel.DiffModel;
-import org.eclipse.emf.compare.diff.metamodel.MoveModelElement;
-import org.eclipse.emf.compare.diff.metamodel.UpdateReference;
-import org.eclipse.emf.compare.diff.metamodel.util.DiffSwitch;
-import org.eclipse.emf.compare.match.metamodel.Match2Elements;
-import org.eclipse.emf.compare.match.metamodel.MatchModel;
-import org.eclipse.emf.compare.uml2.diff.UML2DiffEngine;
-import org.eclipse.emf.ecore.EGenericType;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.papyrus.infra.emf.compare.diff.check.FeaturesCheck;
-import org.eclipse.papyrus.infra.emf.compare.diff.check.PapyrusAttributesCheck;
-import org.eclipse.papyrus.infra.emf.compare.diff.utils.PapyrusOptionsAdapter;
-import org.eclipse.papyrus.uml.compare.diff.check.PapyrusUML2ReferencesCheck;
-import org.eclipse.papyrus.uml.compare.diff.internal.utils.UMLDiffElementExtensionBuilder;
-
-public class UMLStandaloneDiffEngine extends UML2DiffEngine {//GenericDiffEngine {
-
- private DiffSwitch<AbstractDiffExtension> extensionBuilder;
-
- private Map<String, Object> options;
-
- protected FeaturesCheck featuresCheck;
-
- public UMLStandaloneDiffEngine() {
- this(null);
- }
-
- public UMLStandaloneDiffEngine(final Map<String, Object> options) {
- this.extensionBuilder = new UMLDiffElementExtensionBuilder();
- this.options = options;
- }
-
- /**
- * This will check if the elements matched by a given {@link Match2Elements} have been moved.
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement} to create if the elements have actually
- * been moved.
- * @param matchElement
- * This contains the mapping information about the elements we need to check for a move.
- */
- protected void checkMoves(DiffGroup root, Match2Elements matchElement) {
- final EObject left = matchElement.getLeftElement();
- final EObject right = matchElement.getRightElement();
-
- if(left instanceof EGenericType || right instanceof EGenericType)
- return;
- if(left.eContainer() != null && right.eContainer() != null && getMatchManager().getMatchedEObject(left.eContainer()) != right.eContainer()) {
- final EStructuralFeature leftFeature = left.eContainingFeature();
- if(this.featuresCheck == null) {
- this.featuresCheck = new FeaturesCheck(getMatchManager(), options);
- }
- if(!this.featuresCheck.shouldBeIgnored(leftFeature) && !this.featuresCheck.shouldBeIgnored(leftFeature, left)) {
- super.checkMoves(root, matchElement);
- }
- }
- }
-
- @Override
- public DiffModel doDiff(MatchModel match, boolean threeWay) {
- DiffModel result = super.doDiff(match, threeWay);
- result = papyrusPostProcess(result);
- addMergeOptions(result);
- return result;
- }
-
-
- /**
- * Attach an adapter containing the merge options to each DiffElement
- *
- * @param diffModel
- * the diffModel
- */
- private void addMergeOptions(final DiffModel diffModel) {
- if(this.options != null) {
- final Iterator<EObject> iter = diffModel.eAllContents();
- while(iter.hasNext()) {
- final EObject current = iter.next();
- if(current instanceof DiffElement) {
- final PapyrusOptionsAdapter adapter = new PapyrusOptionsAdapter(this.options);
- current.eAdapters().add(adapter);
- }
- }
- }
- }
-
- /**
- * Post process default result of Diff.
- * Processes changes stereotypes and tagged values
- *
- * @param diffModel
- * the diff model
- * @return the diff model
- */
- protected DiffModel papyrusPostProcess(DiffModel diffModel) {
- final Iterator<EObject> it = diffModel.eAllContents();
- while(it.hasNext()) {
- DiffElement diffElement = (DiffElement)it.next();
- visitElement(diffModel, diffElement);
- }
- return diffModel;
- }
-
- /**
- * Visit element.
- *
- * @param root
- * the root
- * @param diffElement
- * the diff element
- */
- protected void visitElement(DiffModel root, DiffElement diffElement) {
- AbstractDiffExtension newElement = null;
- if(diffElement instanceof MoveModelElement) {
- newElement = (AbstractDiffExtension)extensionBuilder.doSwitch(diffElement);
- } else if(diffElement instanceof UpdateReference) {
- newElement = (AbstractDiffExtension)extensionBuilder.doSwitch(diffElement);
- }
- if(newElement != null) {
- replaceElement(diffElement, newElement);
- }
- }
-
- //TODO : currently this method hide the initial element. It should be interesting to destroy it no?
- private void replaceElement(final DiffElement oldElement, final AbstractDiffExtension newElement) {
- DiffGroup parent = (DiffGroup)oldElement.eContainer();
- parent.getSubDiffElements().add((DiffElement)newElement);
- ((AbstractDiffExtension)newElement).getHideElements().add(oldElement);
- }
-
- @Override
- protected AttributesCheck getAttributesChecker() {
- if(this.featuresCheck == null) {
- this.featuresCheck = new FeaturesCheck(getMatchManager(), this.options);
- }
- return new PapyrusAttributesCheck(getMatchManager(), this.featuresCheck);
- }
-
- @Override
- protected ReferencesCheck getReferencesChecker() {
- if(this.featuresCheck == null) {
- this.featuresCheck = new FeaturesCheck(getMatchManager(), this.options);
- }
- return new PapyrusUML2ReferencesCheck(getMatchManager(), this.featuresCheck);
- }
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/standalone/UMLStandaloneDiffService.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/standalone/UMLStandaloneDiffService.java deleted file mode 100644 index dd78ee890cf..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/standalone/UMLStandaloneDiffService.java +++ /dev/null @@ -1,167 +0,0 @@ -/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.diff.services.standalone;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.compare.diff.engine.IDiffEngine;
-import org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffGroup;
-import org.eclipse.emf.compare.diff.metamodel.DiffModel;
-import org.eclipse.emf.compare.diff.metamodel.MoveModelElement;
-import org.eclipse.emf.compare.diff.service.DiffService;
-import org.eclipse.emf.compare.match.metamodel.MatchModel;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.papyrus.infra.tools.util.ReflectHelper;
-import org.eclipse.papyrus.uml.compare.diff.Activator;
-
-
-
-public class UMLStandaloneDiffService {
-
- private static Method fillRequiredDifferencesMethod = null;
-
- /**
- * Utility classes don't need to (and shouldn't) be instantiated.
- */
- private UMLStandaloneDiffService() {
- // prevents instantiation
- }
-
-
-
- /**
- * Return a diffmodel created using the match model. This implementation is a generic and simple one.
- *
- * @param match
- * the matching model
- * @param threeWay
- * <code>True</code> if we're computing a three way comparison, <code>False</code> otherwise.
- * @return the corresponding diff model
- */
- public static DiffModel doDiff(MatchModel match, boolean threeWay) {
- return doDiff(match, threeWay, null);
- }
-
- /**
- * Return a diffmodel created using the match model. This implementation is a generic and simple one.
- *
- * @param match
- * the matching model
- * @param threeWay
- * <code>True</code> if we're computing a three way comparison, <code>False</code> otherwise.
- * @param options
- * the options for the diff
- * @return the corresponding diff model
- */
- public static DiffModel doDiff(MatchModel match, boolean threeWay, final Map<String, Object> options) {
- // final IDiffEngine engine = getBestDiffEngine(match);
- final IDiffEngine engine = new UMLStandaloneDiffEngine(options); //TODO verify that it is the correct diff engine for UML
- final DiffModel diff = engine.doDiff(match, threeWay);
-
- final Collection<AbstractDiffExtension> extensions = DiffService.getCorrespondingDiffExtensions(match);
- for(final AbstractDiffExtension ext : extensions) {
- if(ext != null) {
- ext.visit(diff);
- }
- }
-
- engine.reset();
-
- fillRequiredDifferences(diff);
- //clean the diff
- cleanDiff(diff);
-
- return diff;
- }
-
- private static void cleanDiff(final DiffModel diffModel) {
- EList<DiffElement> differences = diffModel.getDifferences();
-
- final List<DiffElement> toRemove = new ArrayList<DiffElement>();
- for(DiffElement current : differences) {
- if(current instanceof MoveModelElement) {//appears when we do a comparison between 2 elements of the same model (name change for example)
- EObject leftTarget = ((MoveModelElement)current).getLeftTarget();
- EObject rightTarget = ((MoveModelElement)current).getRightTarget();
- if(leftTarget == null && rightTarget == null) {
- toRemove.add(current);
- }
- }
- }
- for(DiffElement current : toRemove) {
- EcoreUtil.remove(current);
- }
-
- differences = diffModel.getOwnedElements();
- if(differences.size() == 1 && differences.get(0) instanceof DiffGroup) {
- DiffGroup group = (DiffGroup)differences.get(0);
- if(group.getSubDiffElements().size() == 1 && group.getSubDiffElements().get(0) instanceof DiffGroup) {
- DiffGroup group2 = (DiffGroup)group.getSubDiffElements().get(0);
- if(!group2.isConflicting() && group2.getSubDiffElements().size() == 1) {
- DiffGroup group3 = (DiffGroup)group.getSubDiffElements().get(0);
- if(!group2.isConflicting() && group2.getSubDiffElements().size() == 1) {
- //we should remove its parent!
- // diffModel.getOwnedElements().add(group2);
- // EcoreUtil.remove(group);
- }
- }
- }
- }
- // EList<DiffElement> differences2 = diffModel.getDifferences();
- // if(differences2.size() == 1) {
- // DiffElement el = differences2.get(0);
- // if(el instanceof DiffGroup) {
- // DiffGroup group = (DiffGroup)el;
- // if(group.getSubDiffElements().size() == 1 && group.getSubDiffElements().get(0) instanceof DiffGroup) {
- // group = (DiffGroup)group.getSubDiffElements().get(0);
- // int i = 0;
- // i++;
- //
- // }
- // }
- // }
- }
-
- //TODO write a JUnit test to be sue that the method called reflexively is always available
- private static void fillRequiredDifferences(final DiffModel diff) {
- if(fillRequiredDifferencesMethod == null) {
- try {
- fillRequiredDifferencesMethod = ReflectHelper.getMethod(DiffService.class, "fillRequiredDifferences", new Class<?>[]{ EObject.class });
- } catch (SecurityException e) {
- Activator.log.error(e);
- } catch (NoSuchMethodException e) {
- Activator.log.error(e);
- }
- }
- final Object[] parameters = new Object[1];
- parameters[0] = diff;
- try {
- fillRequiredDifferencesMethod.invoke(null, parameters);
- } catch (IllegalArgumentException e) {
- Activator.log.error(e);
- } catch (IllegalAccessException e) {
- Activator.log.error(e);
- } catch (InvocationTargetException e) {
- Activator.log.error(e);
- }
- }
-}
diff --git a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/standalone/UMLStandaloneMatchEngine.java b/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/standalone/UMLStandaloneMatchEngine.java deleted file mode 100644 index 47dc6f72308..00000000000 --- a/deprecated/uml-compare-1.X/org.eclipse.papyrus.uml.compare.diff/src/org/eclipse/papyrus/uml/compare/diff/services/standalone/UMLStandaloneMatchEngine.java +++ /dev/null @@ -1,21 +0,0 @@ -/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- * Adapted code from EMF-Compare
- *****************************************************************************/
-package org.eclipse.papyrus.uml.compare.diff.services.standalone;
-
-import org.eclipse.emf.compare.uml2.match.UML2MatchEngine;
-
-
-public class UMLStandaloneMatchEngine extends UML2MatchEngine {
- //nothing to do for the moment
-}
|