From d1eb4952002cb745de84b1c49a4c0d06ecf4a6d3 Mon Sep 17 00:00:00 2001 From: Camille Letavernier Date: Wed, 7 May 2014 14:05:46 +0200 Subject: 434133: [ModelExplorer] ModelExplorer items should be IAdaptable https://bugs.eclipse.org/bugs/show_bug.cgi?id=434133 --- .../META-INF/MANIFEST.MF | 1 - .../internal/treeproxy/EAttributeTreeElement.java | 15 - .../internal/treeproxy/EObjectTreeElement.java | 78 +--- .../internal/treeproxy/EReferenceTreeElement.java | 32 +- .../treeproxy/EStructuralFeatureTreeElement.java | 58 +-- .../v0_2_0/internal/treeproxy/TreeElement.java | 14 +- .../internal/treeproxy/TreeproxyFactory.java | 40 +- .../internal/treeproxy/TreeproxyPackage.java | 518 --------------------- .../treeproxy/impl/AdaptableTreeElementImpl.java | 3 +- .../treeproxy/impl/EAttributeTreeElementImpl.java | 143 +----- .../treeproxy/impl/EObjectTreeElementImpl.java | 271 +---------- .../treeproxy/impl/EReferenceTreeElementImpl.java | 146 +----- .../impl/EStructuralFeatureTreeElementImpl.java | 259 +++-------- .../internal/treeproxy/impl/TreeElementImpl.java | 42 +- .../treeproxy/impl/TreeproxyFactoryImpl.java | 96 +--- .../treeproxy/impl/TreeproxyPackageImpl.java | 345 -------------- .../treeproxy/util/TreeproxyAdapterFactory.java | 198 -------- .../internal/treeproxy/util/TreeproxySwitch.java | 224 --------- 18 files changed, 182 insertions(+), 2301 deletions(-) delete mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/TreeproxyPackage.java delete mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/impl/TreeproxyPackageImpl.java delete mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/util/TreeproxyAdapterFactory.java delete mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/util/TreeproxySwitch.java (limited to 'plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel') diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/META-INF/MANIFEST.MF b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/META-INF/MANIFEST.MF index 1c994b3df52..0f0fa48b0fe 100644 --- a/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/META-INF/MANIFEST.MF +++ b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/META-INF/MANIFEST.MF @@ -11,7 +11,6 @@ Export-Package: org.eclipse.papyrus.emf.facet.custom.metamodel.custompt, org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.custompt;x-internal:=true, org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy, org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl, - org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.util, org.eclipse.papyrus.emf.facet.custom.metamodel.v0_3_0.query, org.eclipse.papyrus.emf.facet.custom.metamodel.v0_3_0.query.util;x-internal:=true Bundle-Vendor: %providerName diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/EAttributeTreeElement.java b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/EAttributeTreeElement.java index 24b855e24fd..b2975a293b2 100644 --- a/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/EAttributeTreeElement.java +++ b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/EAttributeTreeElement.java @@ -14,13 +14,9 @@ package org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy import org.eclipse.emf.ecore.EAttribute; /** - * * A representation of the model object 'EAttribute Tree Element'. - * * - * * Represents an EAttribute in a tree view - * * *
* The following features are supported: @@ -30,32 +26,21 @@ import org.eclipse.emf.ecore.EAttribute; *
* * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage#getEAttributeTreeElement() - * @model - * @generated */ public interface EAttributeTreeElement extends EStructuralFeatureTreeElement { /** * Returns the value of the 'EAttribute' reference. - * - * - * * The EAttribute represented by this tree element - * * @return the value of the 'EAttribute' reference. * @see #setEAttribute(EAttribute) * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage#getEAttributeTreeElement_EAttribute() - * @model - * @generated */ EAttribute getEAttribute(); /** * Sets the value of the '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EAttributeTreeElement#getEAttribute EAttribute}' reference. - * - * * @param value the new value of the 'EAttribute' reference. * @see #getEAttribute() - * @generated */ void setEAttribute(EAttribute value); diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/EObjectTreeElement.java b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/EObjectTreeElement.java index 4070cfec413..5ca80d34755 100644 --- a/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/EObjectTreeElement.java +++ b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/EObjectTreeElement.java @@ -4,108 +4,70 @@ * 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: * Nicolas Bros (Mia-Software) - Bug 379683 - customizable Tree content provider * Gregoire Dupe (Mia-Software) - Bug 386387 - [CustomizedTreeContentProvider] The TreeElements are not preserved between two calls to getElements() */ package org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy; -import org.eclipse.emf.common.util.EList; +import java.util.List; + import org.eclipse.emf.ecore.EObject; /** - * * A representation of the model object 'EObject Tree Element'. - * * - * * Represents a model element in a tree view - * * ** The following features are supported: *
- * If the meaning of the 'Sf Tree Elmement' containment reference list isn't clear, - * there really should be more of a description here... + * If the meaning of the 'Sf Tree Elmement' containment reference list isn't clear, there really should be more of a description here... *
- * + * * @return the value of the 'Sf Tree Elmement' containment reference list. * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage#getEObjectTreeElement_SfTreeElmement() * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement#getParent - * @model opposite="parent" containment="true" - * @generated - */ - EList- * If the meaning of the 'Parent' reference isn't clear, - * there really should be more of a description here... - *
- * - * @return the value of the 'Parent' container reference. - * @see #setParent(EStructuralFeatureTreeElement) - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage#getEObjectTreeElement_Parent() - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement#getReferedEObjectTE - * @model opposite="referedEObjectTE" transient="false" - * @generated - */ - EStructuralFeatureTreeElement getParent(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement#getParent Parent}' container reference. - * - * - * @param value the new value of the 'Parent' container reference. - * @see #getParent() - * @generated + * opposite="parent" containment="true" */ - void setParent(EStructuralFeatureTreeElement value); + List* The following features are supported: *
* The following features are supported: *
- * If the meaning of the 'Parent' reference isn't clear, - * there really should be more of a description here... - *
- * - * @return the value of the 'Parent' container reference. - * @see #setParent(EObjectTreeElement) - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage#getEStructuralFeatureTreeElement_Parent() - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement#getSfTreeElmement - * @model opposite="sfTreeElmement" transient="false" - * @generated - */ - EObjectTreeElement getParent(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement#getParent Parent}' container reference. - * - * - * @param value the new value of the 'Parent' container reference. - * @see #getParent() - * @generated - */ - void setParent(EObjectTreeElement value); - /** * Returns the value of the 'Refered EObject TE' containment reference list. * The list contents are of type {@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement}. - * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement#getParent Parent}'. - * + * It is bidirectional and its opposite is ' + * {@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement#getParent Parent}'. *- * If the meaning of the 'Refered EObject TE' containment reference list isn't clear, - * there really should be more of a description here... + * If the meaning of the 'Refered EObject TE' containment reference list isn't clear, there really should be more of a description + * here... *
- * + * * @return the value of the 'Refered EObject TE' containment reference list. * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage#getEStructuralFeatureTreeElement_ReferedEObjectTE() * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement#getParent - * @model opposite="parent" containment="true" - * @generated + * opposite="parent" containment="true" */ - EList* The following features are implemented: *
* The following features are implemented: *
* The following features are implemented: *
* The following features are implemented: *
*
* - * @generated */ public abstract class TreeElementImpl extends AdaptableTreeElementImpl implements TreeElement { - /** - * - * - * @generated - */ + + protected TreeElement parent; + protected TreeElementImpl() { super(); } /** - * - * - * @generated + * Returns the parent TreeElement + */ + public TreeElement getParent() { + return parent; + } + + /** + * Sets the parent TreeElement */ - @Override - protected EClass eStaticClass() { - return TreeproxyPackage.Literals.TREE_ELEMENT; + public void setParent(TreeElement newParent) { + parent = newParent; } } //TreeElementImpl diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/impl/TreeproxyFactoryImpl.java b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/impl/TreeproxyFactoryImpl.java index 570f6d87871..62390a4e1a1 100644 --- a/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/impl/TreeproxyFactoryImpl.java +++ b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/impl/TreeproxyFactoryImpl.java @@ -4,131 +4,55 @@ * 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: * Nicolas Bros (Mia-Software) - Bug 379683 - customizable Tree content provider * Gregoire Dupe (Mia-Software) - Bug 386387 - [CustomizedTreeContentProvider] The TreeElements are not preserved between two calls to getElements() */ package org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.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.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.*; +import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EAttributeTreeElement; +import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement; +import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EReferenceTreeElement; +import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement; +import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyFactory; /** - * * An implementation of the model Factory. - * - * @generated + * */ -public class TreeproxyFactoryImpl extends EFactoryImpl implements TreeproxyFactory { +public class TreeproxyFactoryImpl implements TreeproxyFactory { + /** * Creates the default factory implementation. - * - * - * @generated + * */ public static TreeproxyFactory init() { - try { - TreeproxyFactory theTreeproxyFactory = (TreeproxyFactory)EPackage.Registry.INSTANCE.getEFactory(TreeproxyPackage.eNS_URI); - if (theTreeproxyFactory != null) { - return theTreeproxyFactory; - } - } - catch (Exception exception) { - EcorePlugin.INSTANCE.log(exception); - } return new TreeproxyFactoryImpl(); } - /** - * Creates an instance of the factory. - * - * - * @generated - */ public TreeproxyFactoryImpl() { super(); } - /** - * - * - * @generated - */ - @Override - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case TreeproxyPackage.EOBJECT_TREE_ELEMENT: return createEObjectTreeElement(); - case TreeproxyPackage.EREFERENCE_TREE_ELEMENT: return createEReferenceTreeElement(); - case TreeproxyPackage.EATTRIBUTE_TREE_ELEMENT: return createEAttributeTreeElement(); - case TreeproxyPackage.ESTRUCTURAL_FEATURE_TREE_ELEMENT: return createEStructuralFeatureTreeElement(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ public EObjectTreeElement createEObjectTreeElement() { EObjectTreeElementImpl eObjectTreeElement = new EObjectTreeElementImpl(); return eObjectTreeElement; } - /** - * - * - * @generated - */ public EReferenceTreeElement createEReferenceTreeElement() { EReferenceTreeElementImpl eReferenceTreeElement = new EReferenceTreeElementImpl(); return eReferenceTreeElement; } - /** - * - * - * @generated - */ public EAttributeTreeElement createEAttributeTreeElement() { EAttributeTreeElementImpl eAttributeTreeElement = new EAttributeTreeElementImpl(); return eAttributeTreeElement; } - /** - * - * - * @generated - */ public EStructuralFeatureTreeElement createEStructuralFeatureTreeElement() { EStructuralFeatureTreeElementImpl eStructuralFeatureTreeElement = new EStructuralFeatureTreeElementImpl(); return eStructuralFeatureTreeElement; } - /** - * - * - * @generated - */ - public TreeproxyPackage getTreeproxyPackage() { - return (TreeproxyPackage)getEPackage(); - } - - /** - * - * - * @deprecated - * @generated - */ - @Deprecated - public static TreeproxyPackage getPackage() { - return TreeproxyPackage.eINSTANCE; - } - } //TreeproxyFactoryImpl diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/impl/TreeproxyPackageImpl.java b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/impl/TreeproxyPackageImpl.java deleted file mode 100644 index 89db1f4aee2..00000000000 --- a/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/impl/TreeproxyPackageImpl.java +++ /dev/null @@ -1,345 +0,0 @@ -/** - * Copyright (c) 2012 Mia-Software. - * 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: - * Nicolas Bros (Mia-Software) - Bug 379683 - customizable Tree content provider - * Gregoire Dupe (Mia-Software) - Bug 386387 - [CustomizedTreeContentProvider] The TreeElements are not preserved between two calls to getElements() - */ -package org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.impl.EPackageImpl; -import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EAttributeTreeElement; -import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement; -import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EReferenceTreeElement; -import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement; -import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeElement; -import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyFactory; -import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage; - -/** - * - * An implementation of the model Package. - * - * @generated - */ -public class TreeproxyPackageImpl extends EPackageImpl implements TreeproxyPackage { - /** - * - * - * @generated - */ - private EClass treeElementEClass = null; - - /** - * - * - * @generated - */ - private EClass eObjectTreeElementEClass = null; - - /** - * - * - * @generated - */ - private EClass eReferenceTreeElementEClass = null; - - /** - * - * - * @generated - */ - private EClass eAttributeTreeElementEClass = null; - - /** - * - * - * @generated - */ - private EClass eStructuralFeatureTreeElementEClass = null; - - /** - * Creates an instance of the model Package, registered with - * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package - * package URI value. - *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. - * - * - * @see org.eclipse.emf.ecore.EPackage.Registry - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage#eNS_URI - * @see #init() - * @generated - */ - private TreeproxyPackageImpl() { - super(eNS_URI, TreeproxyFactory.eINSTANCE); - } - - /** - * - * - * @generated - */ - private static boolean isInited = false; - - /** - * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. - * - *
This method is used to initialize {@link TreeproxyPackage#eINSTANCE} when that field is accessed.
- * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
- *
- *
- * @see #eNS_URI
- * @see #createPackageContents()
- * @see #initializePackageContents()
- * @generated
- */
- public static TreeproxyPackage init() {
- if (isInited) return (TreeproxyPackage)EPackage.Registry.INSTANCE.getEPackage(TreeproxyPackage.eNS_URI);
-
- // Obtain or create and register package
- TreeproxyPackageImpl theTreeproxyPackage = (TreeproxyPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof TreeproxyPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new TreeproxyPackageImpl());
-
- isInited = true;
-
- // Initialize simple dependencies
- EcorePackage.eINSTANCE.eClass();
-
- // Create package meta-data objects
- theTreeproxyPackage.createPackageContents();
-
- // Initialize created meta-data
- theTreeproxyPackage.initializePackageContents();
-
- // Mark meta-data to indicate it can't be changed
- theTreeproxyPackage.freeze();
-
-
- // Update the registry and return the package
- EPackage.Registry.INSTANCE.put(TreeproxyPackage.eNS_URI, theTreeproxyPackage);
- return theTreeproxyPackage;
- }
-
- /**
- *
- *
- * @generated
- */
- public EClass getTreeElement() {
- return treeElementEClass;
- }
-
- /**
- *
- *
- * @generated
- */
- public EClass getEObjectTreeElement() {
- return eObjectTreeElementEClass;
- }
-
- /**
- *
- *
- * @generated
- */
- public EReference getEObjectTreeElement_EObject() {
- return (EReference)eObjectTreeElementEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- *
- *
- * @generated
- */
- public EReference getEObjectTreeElement_SfTreeElmement() {
- return (EReference)eObjectTreeElementEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- *
- *
- * @generated
- */
- public EReference getEObjectTreeElement_Parent() {
- return (EReference)eObjectTreeElementEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- *
- *
- * @generated
- */
- public EClass getEReferenceTreeElement() {
- return eReferenceTreeElementEClass;
- }
-
- /**
- *
- *
- * @generated
- */
- public EReference getEReferenceTreeElement_EReference() {
- return (EReference)eReferenceTreeElementEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- *
- *
- * @generated
- */
- public EClass getEAttributeTreeElement() {
- return eAttributeTreeElementEClass;
- }
-
- /**
- *
- *
- * @generated
- */
- public EReference getEAttributeTreeElement_EAttribute() {
- return (EReference)eAttributeTreeElementEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- *
- *
- * @generated
- */
- public EClass getEStructuralFeatureTreeElement() {
- return eStructuralFeatureTreeElementEClass;
- }
-
- /**
- *
- *
- * @generated
- */
- public EReference getEStructuralFeatureTreeElement_Parent() {
- return (EReference)eStructuralFeatureTreeElementEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- *
- *
- * @generated
- */
- public EReference getEStructuralFeatureTreeElement_ReferedEObjectTE() {
- return (EReference)eStructuralFeatureTreeElementEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- *
- *
- * @generated
- */
- public TreeproxyFactory getTreeproxyFactory() {
- return (TreeproxyFactory)getEFactoryInstance();
- }
-
- /**
- *
- *
- * @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.
- *
- *
- * @generated
- */
- public void createPackageContents() {
- if (isCreated) return;
- isCreated = true;
-
- // Create classes and their features
- treeElementEClass = createEClass(TREE_ELEMENT);
-
- eObjectTreeElementEClass = createEClass(EOBJECT_TREE_ELEMENT);
- createEReference(eObjectTreeElementEClass, EOBJECT_TREE_ELEMENT__EOBJECT);
- createEReference(eObjectTreeElementEClass, EOBJECT_TREE_ELEMENT__SF_TREE_ELMEMENT);
- createEReference(eObjectTreeElementEClass, EOBJECT_TREE_ELEMENT__PARENT);
-
- eReferenceTreeElementEClass = createEClass(EREFERENCE_TREE_ELEMENT);
- createEReference(eReferenceTreeElementEClass, EREFERENCE_TREE_ELEMENT__EREFERENCE);
-
- eAttributeTreeElementEClass = createEClass(EATTRIBUTE_TREE_ELEMENT);
- createEReference(eAttributeTreeElementEClass, EATTRIBUTE_TREE_ELEMENT__EATTRIBUTE);
-
- eStructuralFeatureTreeElementEClass = createEClass(ESTRUCTURAL_FEATURE_TREE_ELEMENT);
- createEReference(eStructuralFeatureTreeElementEClass, ESTRUCTURAL_FEATURE_TREE_ELEMENT__PARENT);
- createEReference(eStructuralFeatureTreeElementEClass, ESTRUCTURAL_FEATURE_TREE_ELEMENT__REFERED_EOBJECT_TE);
- }
-
- /**
- *
- *
- * @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.
- *
- *
- * @generated
- */
- public void initializePackageContents() {
- if (isInitialized) return;
- isInitialized = true;
-
- // Initialize package
- setName(eNAME);
- setNsPrefix(eNS_PREFIX);
- setNsURI(eNS_URI);
-
- // Obtain other dependent packages
- EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
-
- // Create type parameters
-
- // Set bounds for type parameters
-
- // Add supertypes to classes
- eObjectTreeElementEClass.getESuperTypes().add(this.getTreeElement());
- eReferenceTreeElementEClass.getESuperTypes().add(this.getEStructuralFeatureTreeElement());
- eAttributeTreeElementEClass.getESuperTypes().add(this.getEStructuralFeatureTreeElement());
- eStructuralFeatureTreeElementEClass.getESuperTypes().add(this.getTreeElement());
-
- // Initialize classes and features; add operations and parameters
- initEClass(treeElementEClass, TreeElement.class, "TreeElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(eObjectTreeElementEClass, EObjectTreeElement.class, "EObjectTreeElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getEObjectTreeElement_EObject(), ecorePackage.getEObject(), null, "eObject", null, 0, 1, EObjectTreeElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getEObjectTreeElement_SfTreeElmement(), this.getEStructuralFeatureTreeElement(), this.getEStructuralFeatureTreeElement_Parent(), "sfTreeElmement", null, 0, -1, EObjectTreeElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getEObjectTreeElement_Parent(), this.getEStructuralFeatureTreeElement(), this.getEStructuralFeatureTreeElement_ReferedEObjectTE(), "parent", null, 0, 1, EObjectTreeElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(eReferenceTreeElementEClass, EReferenceTreeElement.class, "EReferenceTreeElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getEReferenceTreeElement_EReference(), theEcorePackage.getEReference(), null, "eReference", null, 0, 1, EReferenceTreeElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(eAttributeTreeElementEClass, EAttributeTreeElement.class, "EAttributeTreeElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getEAttributeTreeElement_EAttribute(), theEcorePackage.getEAttribute(), null, "eAttribute", null, 0, 1, EAttributeTreeElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(eStructuralFeatureTreeElementEClass, EStructuralFeatureTreeElement.class, "EStructuralFeatureTreeElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getEStructuralFeatureTreeElement_Parent(), this.getEObjectTreeElement(), this.getEObjectTreeElement_SfTreeElmement(), "parent", null, 0, 1, EStructuralFeatureTreeElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getEStructuralFeatureTreeElement_ReferedEObjectTE(), this.getEObjectTreeElement(), this.getEObjectTreeElement_Parent(), "referedEObjectTE", null, 0, -1, EStructuralFeatureTreeElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- // Create resource
- createResource(eNS_URI);
- }
-
-} //TreeproxyPackageImpl
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/util/TreeproxyAdapterFactory.java b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/util/TreeproxyAdapterFactory.java
deleted file mode 100644
index dd697e50712..00000000000
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/util/TreeproxyAdapterFactory.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/**
- * Copyright (c) 2012 Mia-Software.
- * 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:
- * Nicolas Bros (Mia-Software) - Bug 379683 - customizable Tree content provider
- * Gregoire Dupe (Mia-Software) - Bug 386387 - [CustomizedTreeContentProvider] The TreeElements are not preserved between two calls to getElements()
- */
-package org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.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.ecore.EObject;
-import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.*;
-
-/**
- *
- * The Adapter Factory for the model.
- * It provides an adapter createXXX
method for each class of the model.
- *
- * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage
- * @generated
- */
-public class TreeproxyAdapterFactory extends AdapterFactoryImpl {
- /**
- * The cached model package.
- *
- *
- * @generated
- */
- protected static TreeproxyPackage modelPackage;
-
- /**
- * Creates an instance of the adapter factory.
- *
- *
- * @generated
- */
- public TreeproxyAdapterFactory() {
- if (modelPackage == null) {
- modelPackage = TreeproxyPackage.eINSTANCE;
- }
- }
-
- /**
- * Returns whether this factory is applicable for the type of the object.
- *
- * This implementation returns true
if the object is either the model's package or is an instance object of the model.
- *
- * @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 createXXX
methods.
- *
- *
- * @generated
- */
- protected TreeproxySwitchtarget
.
- *
- *
- * @param target the object to adapt.
- * @return the adapter for the target
.
- * @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.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeElement Tree Element}'.
- *
- * 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.
- *
- * @return the new adapter.
- * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeElement
- * @generated
- */
- public Adapter createTreeElementAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement EObject Tree Element}'.
- *
- * 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.
- *
- * @return the new adapter.
- * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement
- * @generated
- */
- public Adapter createEObjectTreeElementAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EReferenceTreeElement EReference Tree Element}'.
- *
- * 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.
- *
- * @return the new adapter.
- * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EReferenceTreeElement
- * @generated
- */
- public Adapter createEReferenceTreeElementAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EAttributeTreeElement EAttribute Tree Element}'.
- *
- * 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.
- *
- * @return the new adapter.
- * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EAttributeTreeElement
- * @generated
- */
- public Adapter createEAttributeTreeElementAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement EStructural Feature Tree Element}'.
- *
- * 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.
- *
- * @return the new adapter.
- * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement
- * @generated
- */
- public Adapter createEStructuralFeatureTreeElementAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for the default case.
- *
- * This default implementation returns null.
- *
- * @return the new adapter.
- * @generated
- */
- public Adapter createEObjectAdapter() {
- return null;
- }
-
-} //TreeproxyAdapterFactory
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/util/TreeproxySwitch.java b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/util/TreeproxySwitch.java
deleted file mode 100644
index 8281d9765ba..00000000000
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/util/TreeproxySwitch.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/**
- * Copyright (c) 2012 Mia-Software.
- * 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:
- * Nicolas Bros (Mia-Software) - Bug 379683 - customizable Tree content provider
- * Gregoire Dupe (Mia-Software) - Bug 386387 - [CustomizedTreeContentProvider] The TreeElements are not preserved between two calls to getElements()
- */
-package org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.util;
-
-import java.util.List;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.*;
-
-/**
- *
- * The Switch for the model's inheritance hierarchy.
- * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
- * to invoke the caseXXX
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.
- *
- * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage
- * @generated
- */
-public class TreeproxySwitchcaseXXX
for each class of the model until one returns a non null result; it yields that result.
- *
- *
- * @return the first non-null result returned by a caseXXX
call.
- * @generated
- */
- public T doSwitch(EObject theEObject) {
- return doSwitch(theEObject.eClass(), theEObject);
- }
-
- /**
- * Calls caseXXX
for each class of the model until one returns a non null result; it yields that result.
- *
- *
- * @return the first non-null result returned by a caseXXX
call.
- * @generated
- */
- protected T doSwitch(EClass theEClass, EObject theEObject) {
- if (theEClass.eContainer() == modelPackage) {
- return doSwitch(theEClass.getClassifierID(), theEObject);
- }
- else {
- ListcaseXXX
for each class of the model until one returns a non null result; it yields that result.
- *
- *
- * @return the first non-null result returned by a caseXXX
call.
- * @generated
- */
- protected T doSwitch(int classifierID, EObject theEObject) {
- switch (classifierID) {
- case TreeproxyPackage.TREE_ELEMENT: {
- TreeElement treeElement = (TreeElement)theEObject;
- T result = caseTreeElement(treeElement);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case TreeproxyPackage.EOBJECT_TREE_ELEMENT: {
- EObjectTreeElement eObjectTreeElement = (EObjectTreeElement)theEObject;
- T result = caseEObjectTreeElement(eObjectTreeElement);
- if (result == null) result = caseTreeElement(eObjectTreeElement);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case TreeproxyPackage.EREFERENCE_TREE_ELEMENT: {
- EReferenceTreeElement eReferenceTreeElement = (EReferenceTreeElement)theEObject;
- T result = caseEReferenceTreeElement(eReferenceTreeElement);
- if (result == null) result = caseEStructuralFeatureTreeElement(eReferenceTreeElement);
- if (result == null) result = caseTreeElement(eReferenceTreeElement);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case TreeproxyPackage.EATTRIBUTE_TREE_ELEMENT: {
- EAttributeTreeElement eAttributeTreeElement = (EAttributeTreeElement)theEObject;
- T result = caseEAttributeTreeElement(eAttributeTreeElement);
- if (result == null) result = caseEStructuralFeatureTreeElement(eAttributeTreeElement);
- if (result == null) result = caseTreeElement(eAttributeTreeElement);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case TreeproxyPackage.ESTRUCTURAL_FEATURE_TREE_ELEMENT: {
- EStructuralFeatureTreeElement eStructuralFeatureTreeElement = (EStructuralFeatureTreeElement)theEObject;
- T result = caseEStructuralFeatureTreeElement(eStructuralFeatureTreeElement);
- if (result == null) result = caseTreeElement(eStructuralFeatureTreeElement);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- default: return defaultCase(theEObject);
- }
- }
-
- /**
- * Returns the result of interpreting the object as an instance of 'Tree Element'.
- *
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- *
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of 'Tree Element'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseTreeElement(TreeElement object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of 'EObject Tree Element'.
- *
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- *
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of 'EObject Tree Element'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseEObjectTreeElement(EObjectTreeElement object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of 'EReference Tree Element'.
- *
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- *
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of 'EReference Tree Element'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseEReferenceTreeElement(EReferenceTreeElement object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of 'EAttribute Tree Element'.
- *
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- *
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of 'EAttribute Tree Element'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseEAttributeTreeElement(EAttributeTreeElement object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of 'EStructural Feature Tree Element'.
- *
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- *
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of 'EStructural Feature Tree Element'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseEStructuralFeatureTreeElement(EStructuralFeatureTreeElement object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of 'EObject'.
- *
- * This implementation returns null;
- * returning a non-null result will terminate the switch, but this is the last case anyway.
- *
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of 'EObject'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject)
- * @generated
- */
- public T defaultCase(EObject object) {
- return null;
- }
-
-} //TreeproxySwitch
--
cgit v1.2.3