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: *

*

* * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage#getEObjectTreeElement() - * @model - * @generated */ public interface EObjectTreeElement extends TreeElement { + /** * Returns the value of the 'EObject' reference. - * - * - * * The model element represented by this tree element - * + * * @return the value of the 'EObject' reference. * @see #setEObject(EObject) * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage#getEObjectTreeElement_EObject() - * @model - * @generated */ EObject getEObject(); /** - * Sets the value of the '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement#getEObject EObject}' reference. - * - * - * @param value the new value of the 'EObject' reference. + * Sets the value of the '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement#getEObject + * EObject}' reference. + * + * @param value + * the new value of the 'EObject' reference. * @see #getEObject() - * @generated */ void setEObject(EObject value); /** * Returns the value of the 'Sf Tree Elmement' containment reference list. * The list contents are of type {@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement}. - * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement#getParent Parent}'. - * + * It is bidirectional and its opposite is ' + * {@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement#getParent Parent}'. *

- * 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 getSfTreeElmement(); - - /** - * Returns the value of the 'Parent' container reference. - * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement#getReferedEObjectTE Refered EObject TE}'. - * - *

- * 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 getSfTreeElmement(); } // EObjectTreeElement 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/EReferenceTreeElement.java b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/EReferenceTreeElement.java index 1c28f9ed4b6..b0a09a60af5 100644 --- a/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/EReferenceTreeElement.java +++ b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/EReferenceTreeElement.java @@ -4,7 +4,7 @@ * 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() @@ -14,49 +14,43 @@ package org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy import org.eclipse.emf.ecore.EReference; /** - * * A representation of the model object 'EReference Tree Element'. - * * - * * Represents an EReference as a link between two model elements in a tree view - * * *

* The following features are supported: *

*

* * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage#getEReferenceTreeElement() - * @model - * @generated */ public interface EReferenceTreeElement extends EStructuralFeatureTreeElement { + /** * Returns the value of the 'EReference' reference. - * - * - * * The EReference represented by this tree element - * + * * @return the value of the 'EReference' reference. * @see #setEReference(EReference) * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage#getEReferenceTreeElement_EReference() - * @model - * @generated */ EReference getEReference(); /** - * Sets the value of the '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EReferenceTreeElement#getEReference EReference}' reference. - * - * - * @param value the new value of the 'EReference' reference. + * Sets the value of the '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EReferenceTreeElement#getEReference + * EReference}' reference. + * + * @param value + * the new value of the 'EReference' reference. * @see #getEReference() - * @generated */ void setEReference(EReference value); + public EObjectTreeElement getParent(); + + public void setParent(EObjectTreeElement parent); + } // EReferenceTreeElement 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/EStructuralFeatureTreeElement.java b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/EStructuralFeatureTreeElement.java index 88d29467798..ef6b6910e3b 100644 --- a/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/EStructuralFeatureTreeElement.java +++ b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/EStructuralFeatureTreeElement.java @@ -4,78 +4,46 @@ * 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() + * 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; /** - * * A representation of the model object 'EStructural Feature Tree Element'. - * * *

* The following features are supported: *

*

* * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage#getEStructuralFeatureTreeElement() - * @model - * @generated */ public interface EStructuralFeatureTreeElement extends TreeElement { - /** - * Returns the value of the 'Parent' container reference. - * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement#getSfTreeElmement Sf Tree Elmement}'. - * - *

- * 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 getReferedEObjectTE(); + List getReferedEObjectTE(); } // EStructuralFeatureTreeElement 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/TreeElement.java b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/TreeElement.java index 07d2ea8b80c..a1b7fcc9e70 100644 --- a/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/TreeElement.java +++ b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/TreeElement.java @@ -11,23 +11,19 @@ */ package org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.emf.ecore.EObject; /** - * * A representation of the model object 'Tree Element'. - * * - * * Represents a proxy element in a tree view - * * * * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage#getTreeElement() - * @model abstract="true" - * @generated + * abstract="true" */ -public interface TreeElement extends EObject { +public interface TreeElement { + public TreeElement getParent(); + + public void setParent(TreeElement parent); } // TreeElement 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/TreeproxyFactory.java b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/TreeproxyFactory.java index 9d9d3bb32c6..a57f1a98ebf 100644 --- a/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/TreeproxyFactory.java +++ b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/TreeproxyFactory.java @@ -4,75 +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; -import org.eclipse.emf.ecore.EFactory; /** - * + * * The Factory for the model. * It provides a create method for each non-abstract class of the model. - * + * * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage - * @generated */ -public interface TreeproxyFactory extends EFactory { +public interface TreeproxyFactory { + /** * The singleton instance of the factory. - * - * - * @generated + * */ TreeproxyFactory eINSTANCE = org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.TreeproxyFactoryImpl.init(); /** * Returns a new object of class 'EObject Tree Element'. - * - * + * * @return a new object of class 'EObject Tree Element'. - * @generated */ EObjectTreeElement createEObjectTreeElement(); /** * Returns a new object of class 'EReference Tree Element'. - * - * + * * @return a new object of class 'EReference Tree Element'. - * @generated */ EReferenceTreeElement createEReferenceTreeElement(); /** * Returns a new object of class 'EAttribute Tree Element'. - * - * + * * @return a new object of class 'EAttribute Tree Element'. - * @generated */ EAttributeTreeElement createEAttributeTreeElement(); /** * Returns a new object of class 'EStructural Feature Tree Element'. - * - * + * * @return a new object of class 'EStructural Feature Tree Element'. - * @generated */ EStructuralFeatureTreeElement createEStructuralFeatureTreeElement(); - /** - * Returns the package supported by this factory. - * - * - * @return the package supported by this factory. - * @generated - */ - TreeproxyPackage getTreeproxyPackage(); - } //TreeproxyFactory 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/TreeproxyPackage.java b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/TreeproxyPackage.java deleted file mode 100644 index 9d292c2feef..00000000000 --- a/plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/TreeproxyPackage.java +++ /dev/null @@ -1,518 +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; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; - -/** - * - * The Package for the model. - * It contains accessors for the meta objects to represent - *
    - *
  • each class,
  • - *
  • each feature of each class,
  • - *
  • each enum,
  • - *
  • and each data type
  • - *
- * - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyFactory - * @model kind="package" - * @generated - */ -public interface TreeproxyPackage extends EPackage { - /** - * The package name. - * - * - * @generated - */ - String eNAME = "treeproxy"; - - /** - * The package namespace URI. - * - * - * @generated - */ - String eNS_URI = "http://www.eclipse.org/papyrus/emf/facet/custom/0.2.incubation/internal/treeproxy"; - - /** - * The package namespace name. - * - * - * @generated - */ - String eNS_PREFIX = "treeproxy"; - - /** - * The singleton instance of the package. - * - * - * @generated - */ - TreeproxyPackage eINSTANCE = org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.TreeproxyPackageImpl.init(); - - /** - * The meta object id for the '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.TreeElementImpl Tree Element}' class. - * - * - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.TreeElementImpl - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.TreeproxyPackageImpl#getTreeElement() - * @generated - */ - int TREE_ELEMENT = 0; - - /** - * The number of structural features of the 'Tree Element' class. - * - * - * @generated - * @ordered - */ - int TREE_ELEMENT_FEATURE_COUNT = 0; - - /** - * The meta object id for the '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EObjectTreeElementImpl EObject Tree Element}' class. - * - * - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EObjectTreeElementImpl - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.TreeproxyPackageImpl#getEObjectTreeElement() - * @generated - */ - int EOBJECT_TREE_ELEMENT = 1; - - /** - * The feature id for the 'EObject' reference. - * - * - * @generated - * @ordered - */ - int EOBJECT_TREE_ELEMENT__EOBJECT = TREE_ELEMENT_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Sf Tree Elmement' containment reference list. - * - * - * @generated - * @ordered - */ - int EOBJECT_TREE_ELEMENT__SF_TREE_ELMEMENT = TREE_ELEMENT_FEATURE_COUNT + 1; - - /** - * The feature id for the 'Parent' container reference. - * - * - * @generated - * @ordered - */ - int EOBJECT_TREE_ELEMENT__PARENT = TREE_ELEMENT_FEATURE_COUNT + 2; - - /** - * The number of structural features of the 'EObject Tree Element' class. - * - * - * @generated - * @ordered - */ - int EOBJECT_TREE_ELEMENT_FEATURE_COUNT = TREE_ELEMENT_FEATURE_COUNT + 3; - - /** - * The meta object id for the '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EStructuralFeatureTreeElementImpl EStructural Feature Tree Element}' class. - * - * - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EStructuralFeatureTreeElementImpl - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.TreeproxyPackageImpl#getEStructuralFeatureTreeElement() - * @generated - */ - int ESTRUCTURAL_FEATURE_TREE_ELEMENT = 4; - - /** - * The feature id for the 'Parent' container reference. - * - * - * @generated - * @ordered - */ - int ESTRUCTURAL_FEATURE_TREE_ELEMENT__PARENT = TREE_ELEMENT_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Refered EObject TE' containment reference list. - * - * - * @generated - * @ordered - */ - int ESTRUCTURAL_FEATURE_TREE_ELEMENT__REFERED_EOBJECT_TE = TREE_ELEMENT_FEATURE_COUNT + 1; - - /** - * The number of structural features of the 'EStructural Feature Tree Element' class. - * - * - * @generated - * @ordered - */ - int ESTRUCTURAL_FEATURE_TREE_ELEMENT_FEATURE_COUNT = TREE_ELEMENT_FEATURE_COUNT + 2; - - /** - * The meta object id for the '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EReferenceTreeElementImpl EReference Tree Element}' class. - * - * - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EReferenceTreeElementImpl - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.TreeproxyPackageImpl#getEReferenceTreeElement() - * @generated - */ - int EREFERENCE_TREE_ELEMENT = 2; - - /** - * The feature id for the 'Parent' container reference. - * - * - * @generated - * @ordered - */ - int EREFERENCE_TREE_ELEMENT__PARENT = ESTRUCTURAL_FEATURE_TREE_ELEMENT__PARENT; - - /** - * The feature id for the 'Refered EObject TE' containment reference list. - * - * - * @generated - * @ordered - */ - int EREFERENCE_TREE_ELEMENT__REFERED_EOBJECT_TE = ESTRUCTURAL_FEATURE_TREE_ELEMENT__REFERED_EOBJECT_TE; - - /** - * The feature id for the 'EReference' reference. - * - * - * @generated - * @ordered - */ - int EREFERENCE_TREE_ELEMENT__EREFERENCE = ESTRUCTURAL_FEATURE_TREE_ELEMENT_FEATURE_COUNT + 0; - - /** - * The number of structural features of the 'EReference Tree Element' class. - * - * - * @generated - * @ordered - */ - int EREFERENCE_TREE_ELEMENT_FEATURE_COUNT = ESTRUCTURAL_FEATURE_TREE_ELEMENT_FEATURE_COUNT + 1; - - /** - * The meta object id for the '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EAttributeTreeElementImpl EAttribute Tree Element}' class. - * - * - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EAttributeTreeElementImpl - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.TreeproxyPackageImpl#getEAttributeTreeElement() - * @generated - */ - int EATTRIBUTE_TREE_ELEMENT = 3; - - /** - * The feature id for the 'Parent' container reference. - * - * - * @generated - * @ordered - */ - int EATTRIBUTE_TREE_ELEMENT__PARENT = ESTRUCTURAL_FEATURE_TREE_ELEMENT__PARENT; - - /** - * The feature id for the 'Refered EObject TE' containment reference list. - * - * - * @generated - * @ordered - */ - int EATTRIBUTE_TREE_ELEMENT__REFERED_EOBJECT_TE = ESTRUCTURAL_FEATURE_TREE_ELEMENT__REFERED_EOBJECT_TE; - - /** - * The feature id for the 'EAttribute' reference. - * - * - * @generated - * @ordered - */ - int EATTRIBUTE_TREE_ELEMENT__EATTRIBUTE = ESTRUCTURAL_FEATURE_TREE_ELEMENT_FEATURE_COUNT + 0; - - /** - * The number of structural features of the 'EAttribute Tree Element' class. - * - * - * @generated - * @ordered - */ - int EATTRIBUTE_TREE_ELEMENT_FEATURE_COUNT = ESTRUCTURAL_FEATURE_TREE_ELEMENT_FEATURE_COUNT + 1; - - - /** - * Returns the meta object for class '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeElement Tree Element}'. - * - * - * @return the meta object for class 'Tree Element'. - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeElement - * @generated - */ - EClass getTreeElement(); - - /** - * Returns the meta object for class '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement EObject Tree Element}'. - * - * - * @return the meta object for class 'EObject Tree Element'. - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement - * @generated - */ - EClass getEObjectTreeElement(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement#getEObject EObject}'. - * - * - * @return the meta object for the reference 'EObject'. - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement#getEObject() - * @see #getEObjectTreeElement() - * @generated - */ - EReference getEObjectTreeElement_EObject(); - - /** - * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement#getSfTreeElmement Sf Tree Elmement}'. - * - * - * @return the meta object for the containment reference list 'Sf Tree Elmement'. - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement#getSfTreeElmement() - * @see #getEObjectTreeElement() - * @generated - */ - EReference getEObjectTreeElement_SfTreeElmement(); - - /** - * Returns the meta object for the container reference '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement#getParent Parent}'. - * - * - * @return the meta object for the container reference 'Parent'. - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement#getParent() - * @see #getEObjectTreeElement() - * @generated - */ - EReference getEObjectTreeElement_Parent(); - - /** - * Returns the meta object for class '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EReferenceTreeElement EReference Tree Element}'. - * - * - * @return the meta object for class 'EReference Tree Element'. - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EReferenceTreeElement - * @generated - */ - EClass getEReferenceTreeElement(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EReferenceTreeElement#getEReference EReference}'. - * - * - * @return the meta object for the reference 'EReference'. - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EReferenceTreeElement#getEReference() - * @see #getEReferenceTreeElement() - * @generated - */ - EReference getEReferenceTreeElement_EReference(); - - /** - * Returns the meta object for class '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EAttributeTreeElement EAttribute Tree Element}'. - * - * - * @return the meta object for class 'EAttribute Tree Element'. - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EAttributeTreeElement - * @generated - */ - EClass getEAttributeTreeElement(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EAttributeTreeElement#getEAttribute EAttribute}'. - * - * - * @return the meta object for the reference 'EAttribute'. - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EAttributeTreeElement#getEAttribute() - * @see #getEAttributeTreeElement() - * @generated - */ - EReference getEAttributeTreeElement_EAttribute(); - - /** - * Returns the meta object for class '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement EStructural Feature Tree Element}'. - * - * - * @return the meta object for class 'EStructural Feature Tree Element'. - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement - * @generated - */ - EClass getEStructuralFeatureTreeElement(); - - /** - * Returns the meta object for the container reference '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement#getParent Parent}'. - * - * - * @return the meta object for the container reference 'Parent'. - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement#getParent() - * @see #getEStructuralFeatureTreeElement() - * @generated - */ - EReference getEStructuralFeatureTreeElement_Parent(); - - /** - * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement#getReferedEObjectTE Refered EObject TE}'. - * - * - * @return the meta object for the containment reference list 'Refered EObject TE'. - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement#getReferedEObjectTE() - * @see #getEStructuralFeatureTreeElement() - * @generated - */ - EReference getEStructuralFeatureTreeElement_ReferedEObjectTE(); - - /** - * Returns the factory that creates the instances of the model. - * - * - * @return the factory that creates the instances of the model. - * @generated - */ - TreeproxyFactory getTreeproxyFactory(); - - /** - * - * Defines literals for the meta objects that represent - *
    - *
  • each class,
  • - *
  • each feature of each class,
  • - *
  • each enum,
  • - *
  • and each data type
  • - *
- * - * @generated - */ - interface Literals { - /** - * The meta object literal for the '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.TreeElementImpl Tree Element}' class. - * - * - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.TreeElementImpl - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.TreeproxyPackageImpl#getTreeElement() - * @generated - */ - EClass TREE_ELEMENT = eINSTANCE.getTreeElement(); - - /** - * The meta object literal for the '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EObjectTreeElementImpl EObject Tree Element}' class. - * - * - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EObjectTreeElementImpl - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.TreeproxyPackageImpl#getEObjectTreeElement() - * @generated - */ - EClass EOBJECT_TREE_ELEMENT = eINSTANCE.getEObjectTreeElement(); - - /** - * The meta object literal for the 'EObject' reference feature. - * - * - * @generated - */ - EReference EOBJECT_TREE_ELEMENT__EOBJECT = eINSTANCE.getEObjectTreeElement_EObject(); - - /** - * The meta object literal for the 'Sf Tree Elmement' containment reference list feature. - * - * - * @generated - */ - EReference EOBJECT_TREE_ELEMENT__SF_TREE_ELMEMENT = eINSTANCE.getEObjectTreeElement_SfTreeElmement(); - - /** - * The meta object literal for the 'Parent' container reference feature. - * - * - * @generated - */ - EReference EOBJECT_TREE_ELEMENT__PARENT = eINSTANCE.getEObjectTreeElement_Parent(); - - /** - * The meta object literal for the '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EReferenceTreeElementImpl EReference Tree Element}' class. - * - * - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EReferenceTreeElementImpl - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.TreeproxyPackageImpl#getEReferenceTreeElement() - * @generated - */ - EClass EREFERENCE_TREE_ELEMENT = eINSTANCE.getEReferenceTreeElement(); - - /** - * The meta object literal for the 'EReference' reference feature. - * - * - * @generated - */ - EReference EREFERENCE_TREE_ELEMENT__EREFERENCE = eINSTANCE.getEReferenceTreeElement_EReference(); - - /** - * The meta object literal for the '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EAttributeTreeElementImpl EAttribute Tree Element}' class. - * - * - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EAttributeTreeElementImpl - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.TreeproxyPackageImpl#getEAttributeTreeElement() - * @generated - */ - EClass EATTRIBUTE_TREE_ELEMENT = eINSTANCE.getEAttributeTreeElement(); - - /** - * The meta object literal for the 'EAttribute' reference feature. - * - * - * @generated - */ - EReference EATTRIBUTE_TREE_ELEMENT__EATTRIBUTE = eINSTANCE.getEAttributeTreeElement_EAttribute(); - - /** - * The meta object literal for the '{@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EStructuralFeatureTreeElementImpl EStructural Feature Tree Element}' class. - * - * - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EStructuralFeatureTreeElementImpl - * @see org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.TreeproxyPackageImpl#getEStructuralFeatureTreeElement() - * @generated - */ - EClass ESTRUCTURAL_FEATURE_TREE_ELEMENT = eINSTANCE.getEStructuralFeatureTreeElement(); - - /** - * The meta object literal for the 'Parent' container reference feature. - * - * - * @generated - */ - EReference ESTRUCTURAL_FEATURE_TREE_ELEMENT__PARENT = eINSTANCE.getEStructuralFeatureTreeElement_Parent(); - - /** - * The meta object literal for the 'Refered EObject TE' containment reference list feature. - * - * - * @generated - */ - EReference ESTRUCTURAL_FEATURE_TREE_ELEMENT__REFERED_EOBJECT_TE = eINSTANCE.getEStructuralFeatureTreeElement_ReferedEObjectTE(); - - } - -} //TreeproxyPackage 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/AdaptableTreeElementImpl.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/AdaptableTreeElementImpl.java index aaa276c86db..f6b42e4f962 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/AdaptableTreeElementImpl.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/AdaptableTreeElementImpl.java @@ -12,7 +12,6 @@ package org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl; import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.emf.ecore.impl.EObjectImpl; /** * Base class for the TreeProxy metamodel @@ -22,6 +21,6 @@ import org.eclipse.emf.ecore.impl.EObjectImpl; * @author Camille Letavernier * */ -public abstract class AdaptableTreeElementImpl extends EObjectImpl implements IAdaptable { +public abstract class AdaptableTreeElementImpl implements IAdaptable { //Nothing: used in the treeproxy genmodel to specify the IAdaptable interface } 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/EAttributeTreeElementImpl.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/EAttributeTreeElementImpl.java index 97a184ce9d7..ab7072e76d6 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/EAttributeTreeElementImpl.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/EAttributeTreeElementImpl.java @@ -4,179 +4,46 @@ * 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.common.notify.Notification; import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; 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.TreeproxyPackage; /** - * * An implementation of the model object 'EAttribute Tree Element'. - * *

* The following features are implemented: *

    - *
  • {@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EAttributeTreeElementImpl#getEAttribute EAttribute}
  • + *
  • {@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EAttributeTreeElementImpl#getEAttribute EAttribute + * }
  • *
*

* - * @generated */ public class EAttributeTreeElementImpl extends EStructuralFeatureTreeElementImpl implements EAttributeTreeElement { + /** * The cached value of the '{@link #getEAttribute() EAttribute}' reference. - * - * + * * @see #getEAttribute() - * @generated - * @ordered */ protected EAttribute eAttribute; - /** - * - * - * @generated - */ protected EAttributeTreeElementImpl() { super(); } - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return TreeproxyPackage.Literals.EATTRIBUTE_TREE_ELEMENT; - } - - /** - * - * - * @generated - */ public EAttribute getEAttribute() { - if (eAttribute != null && eAttribute.eIsProxy()) { - InternalEObject oldEAttribute = (InternalEObject)eAttribute; - eAttribute = (EAttribute)eResolveProxy(oldEAttribute); - if (eAttribute != oldEAttribute) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, TreeproxyPackage.EATTRIBUTE_TREE_ELEMENT__EATTRIBUTE, oldEAttribute, eAttribute)); - } - } - return eAttribute; - } - - /** - * - * - * @generated - */ - public EAttribute basicGetEAttribute() { return eAttribute; } - /** - * - * - * @generated - */ public void setEAttribute(EAttribute newEAttribute) { - EAttribute oldEAttribute = eAttribute; eAttribute = newEAttribute; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TreeproxyPackage.EATTRIBUTE_TREE_ELEMENT__EATTRIBUTE, oldEAttribute, eAttribute)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case TreeproxyPackage.EATTRIBUTE_TREE_ELEMENT__EATTRIBUTE: - if (resolve) return getEAttribute(); - return basicGetEAttribute(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case TreeproxyPackage.EATTRIBUTE_TREE_ELEMENT__EATTRIBUTE: - setEAttribute((EAttribute)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case TreeproxyPackage.EATTRIBUTE_TREE_ELEMENT__EATTRIBUTE: - setEAttribute((EAttribute)null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case TreeproxyPackage.EATTRIBUTE_TREE_ELEMENT__EATTRIBUTE: - return eAttribute != null; - } - return super.eIsSet(featureID); - } - - /** - * Try to adapt this object to the requested type. - * Check if the underlying EObject ({@link #getEObject()}) can be adapted to the requested type. - * - * @param key - * @return - */ - @Override - public Object getAdapter(Class key) { - // Check if the underlying EObject can request to the adaptation - Object model = getEAttribute(); - - if (key.isInstance(model)){ - return model; - } - else { - return super.getAdapter(key); - } } } //EAttributeTreeElementImpl 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/EObjectTreeElementImpl.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/EObjectTreeElementImpl.java index ed817847d08..a1754e87d0d 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/EObjectTreeElementImpl.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/EObjectTreeElementImpl.java @@ -4,305 +4,72 @@ * 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 java.util.Collection; +import java.util.LinkedList; +import java.util.List; -import org.eclipse.core.runtime.Platform; -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.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.EObjectContainmentWithInverseEList; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; 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.EStructuralFeatureTreeElement; -import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage; /** - * * An implementation of the model object 'EObject Tree Element'. - * *

* The following features are implemented: *

    - *
  • {@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EObjectTreeElementImpl#getEObject EObject}
  • - *
  • {@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EObjectTreeElementImpl#getSfTreeElmement Sf Tree Elmement}
  • - *
  • {@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EObjectTreeElementImpl#getParent Parent}
  • + *
  • {@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EObjectTreeElementImpl#getEObject EObject}
  • + *
  • {@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EObjectTreeElementImpl#getSfTreeElmement Sf Tree + * Elmement}
  • + *
  • {@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EObjectTreeElementImpl#getParent Parent}
  • *
*

* - * @generated */ public class EObjectTreeElementImpl extends TreeElementImpl implements EObjectTreeElement { + /** * The cached value of the '{@link #getEObject() EObject}' reference. - * - * + * * @see #getEObject() - * @generated - * @ordered */ protected EObject eObject; /** * The cached value of the '{@link #getSfTreeElmement() Sf Tree Elmement}' containment reference list. - * - * + * * @see #getSfTreeElmement() - * @generated - * @ordered - */ - protected EList sfTreeElmement; - /** - * - * - * @generated */ + protected List sfTreeElmement; + protected EObjectTreeElementImpl() { super(); } - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return TreeproxyPackage.Literals.EOBJECT_TREE_ELEMENT; - } - - /** - * - * - * @generated - */ public EObject getEObject() { - if (eObject != null && eObject.eIsProxy()) { - InternalEObject oldEObject = (InternalEObject)eObject; - eObject = eResolveProxy(oldEObject); - if (eObject != oldEObject) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, TreeproxyPackage.EOBJECT_TREE_ELEMENT__EOBJECT, oldEObject, eObject)); - } - } return eObject; } - /** - * - * - * @generated - */ public EObject basicGetEObject() { return eObject; } - /** - * - * - * @generated - */ public void setEObject(EObject newEObject) { - EObject oldEObject = eObject; eObject = newEObject; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TreeproxyPackage.EOBJECT_TREE_ELEMENT__EOBJECT, oldEObject, eObject)); } - /** - * - * - * @generated - */ - public EList getSfTreeElmement() { - if (sfTreeElmement == null) { - sfTreeElmement = new EObjectContainmentWithInverseEList(EStructuralFeatureTreeElement.class, this, TreeproxyPackage.EOBJECT_TREE_ELEMENT__SF_TREE_ELMEMENT, TreeproxyPackage.ESTRUCTURAL_FEATURE_TREE_ELEMENT__PARENT); + public List getSfTreeElmement() { + if(sfTreeElmement == null) { + sfTreeElmement = new LinkedList(); } return sfTreeElmement; } - /** - * - * - * @generated - */ - public EStructuralFeatureTreeElement getParent() { - if (eContainerFeatureID() != TreeproxyPackage.EOBJECT_TREE_ELEMENT__PARENT) return null; - return (EStructuralFeatureTreeElement)eInternalContainer(); - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetParent(EStructuralFeatureTreeElement newParent, NotificationChain msgs) { - msgs = eBasicSetContainer((InternalEObject)newParent, TreeproxyPackage.EOBJECT_TREE_ELEMENT__PARENT, msgs); - return msgs; - } - - /** - * - * - * @generated - */ - public void setParent(EStructuralFeatureTreeElement newParent) { - if (newParent != eInternalContainer() || (eContainerFeatureID() != TreeproxyPackage.EOBJECT_TREE_ELEMENT__PARENT && newParent != null)) { - if (EcoreUtil.isAncestor(this, newParent)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newParent != null) - msgs = ((InternalEObject)newParent).eInverseAdd(this, TreeproxyPackage.ESTRUCTURAL_FEATURE_TREE_ELEMENT__REFERED_EOBJECT_TE, EStructuralFeatureTreeElement.class, msgs); - msgs = basicSetParent(newParent, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TreeproxyPackage.EOBJECT_TREE_ELEMENT__PARENT, newParent, newParent)); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case TreeproxyPackage.EOBJECT_TREE_ELEMENT__SF_TREE_ELMEMENT: - return ((InternalEList)(InternalEList)getSfTreeElmement()).basicAdd(otherEnd, msgs); - case TreeproxyPackage.EOBJECT_TREE_ELEMENT__PARENT: - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - return basicSetParent((EStructuralFeatureTreeElement)otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case TreeproxyPackage.EOBJECT_TREE_ELEMENT__SF_TREE_ELMEMENT: - return ((InternalEList)getSfTreeElmement()).basicRemove(otherEnd, msgs); - case TreeproxyPackage.EOBJECT_TREE_ELEMENT__PARENT: - return basicSetParent(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { - switch (eContainerFeatureID()) { - case TreeproxyPackage.EOBJECT_TREE_ELEMENT__PARENT: - return eInternalContainer().eInverseRemove(this, TreeproxyPackage.ESTRUCTURAL_FEATURE_TREE_ELEMENT__REFERED_EOBJECT_TE, EStructuralFeatureTreeElement.class, msgs); - } - return super.eBasicRemoveFromContainerFeature(msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case TreeproxyPackage.EOBJECT_TREE_ELEMENT__EOBJECT: - if (resolve) return getEObject(); - return basicGetEObject(); - case TreeproxyPackage.EOBJECT_TREE_ELEMENT__SF_TREE_ELMEMENT: - return getSfTreeElmement(); - case TreeproxyPackage.EOBJECT_TREE_ELEMENT__PARENT: - return getParent(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case TreeproxyPackage.EOBJECT_TREE_ELEMENT__EOBJECT: - setEObject((EObject)newValue); - return; - case TreeproxyPackage.EOBJECT_TREE_ELEMENT__SF_TREE_ELMEMENT: - getSfTreeElmement().clear(); - getSfTreeElmement().addAll((Collection)newValue); - return; - case TreeproxyPackage.EOBJECT_TREE_ELEMENT__PARENT: - setParent((EStructuralFeatureTreeElement)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case TreeproxyPackage.EOBJECT_TREE_ELEMENT__EOBJECT: - setEObject((EObject)null); - return; - case TreeproxyPackage.EOBJECT_TREE_ELEMENT__SF_TREE_ELMEMENT: - getSfTreeElmement().clear(); - return; - case TreeproxyPackage.EOBJECT_TREE_ELEMENT__PARENT: - setParent((EStructuralFeatureTreeElement)null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case TreeproxyPackage.EOBJECT_TREE_ELEMENT__EOBJECT: - return eObject != null; - case TreeproxyPackage.EOBJECT_TREE_ELEMENT__SF_TREE_ELMEMENT: - return sfTreeElmement != null && !sfTreeElmement.isEmpty(); - case TreeproxyPackage.EOBJECT_TREE_ELEMENT__PARENT: - return getParent() != null; - } - return super.eIsSet(featureID); - } - /** * Try to adapt this object to the requested type. * Check if the underlying EObject ({@link #getEObject()}) can be adapted to the requested type. @@ -311,16 +78,14 @@ public class EObjectTreeElementImpl extends TreeElementImpl implements EObjectTr * @return */ public Object getAdapter(Class key) { - // Check if the underlying EObject can request to the adaptation Object model = getEObject(); - if (key.isInstance(model)){ + if(key.isInstance(model)) { return model; - } - else { + } else { // Try the platform process -// return Platform.getAdapterManager().getAdapter(model, key); + // return Platform.getAdapterManager().getAdapter(model, key); return null; } } 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/EReferenceTreeElementImpl.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/EReferenceTreeElementImpl.java index 386dadcf6c7..f4cde724fb4 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/EReferenceTreeElementImpl.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/EReferenceTreeElementImpl.java @@ -4,180 +4,58 @@ * 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.common.notify.Notification; -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.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.TreeproxyPackage; +import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeElement; /** - * * An implementation of the model object 'EReference Tree Element'. - * *

* The following features are implemented: *

    - *
  • {@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EReferenceTreeElementImpl#getEReference EReference}
  • + *
  • {@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EReferenceTreeElementImpl#getEReference EReference + * }
  • *
*

* - * @generated */ public class EReferenceTreeElementImpl extends EStructuralFeatureTreeElementImpl implements EReferenceTreeElement { + /** * The cached value of the '{@link #getEReference() EReference}' reference. - * - * + * * @see #getEReference() - * @generated - * @ordered */ protected EReference eReference; - /** - * - * - * @generated - */ protected EReferenceTreeElementImpl() { super(); } - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return TreeproxyPackage.Literals.EREFERENCE_TREE_ELEMENT; - } - - /** - * - * - * @generated - */ public EReference getEReference() { - if (eReference != null && eReference.eIsProxy()) { - InternalEObject oldEReference = (InternalEObject)eReference; - eReference = (EReference)eResolveProxy(oldEReference); - if (eReference != oldEReference) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, TreeproxyPackage.EREFERENCE_TREE_ELEMENT__EREFERENCE, oldEReference, eReference)); - } - } - return eReference; - } - - /** - * - * - * @generated - */ - public EReference basicGetEReference() { return eReference; } - /** - * - * - * @generated - */ public void setEReference(EReference newEReference) { - EReference oldEReference = eReference; eReference = newEReference; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TreeproxyPackage.EREFERENCE_TREE_ELEMENT__EREFERENCE, oldEReference, eReference)); } - /** - * - * - * @generated - */ @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case TreeproxyPackage.EREFERENCE_TREE_ELEMENT__EREFERENCE: - if (resolve) return getEReference(); - return basicGetEReference(); - } - return super.eGet(featureID, resolve, coreType); + public EObjectTreeElement getParent() { + return (EObjectTreeElement)super.getParent(); } - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case TreeproxyPackage.EREFERENCE_TREE_ELEMENT__EREFERENCE: - setEReference((EReference)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case TreeproxyPackage.EREFERENCE_TREE_ELEMENT__EREFERENCE: - setEReference((EReference)null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case TreeproxyPackage.EREFERENCE_TREE_ELEMENT__EREFERENCE: - return eReference != null; - } - return super.eIsSet(featureID); - } - - /** - * Try to adapt this object to the requested type. - * Check if the underlying EObject ({@link #getEObject()}) can be adapted to the requested type. - * - * @param key - * @return - */ - @Override - public Object getAdapter(Class key) { - // Check if the underlying EObject can request to the adaptation - Object model = getEReference(); - - if (key.isInstance(model)){ - return model; - } - else { - return super.getAdapter(key); - } - + public void setParent(EObjectTreeElement parent) { + super.setParent(parent); } } //EReferenceTreeElementImpl 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/EStructuralFeatureTreeElementImpl.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/EStructuralFeatureTreeElementImpl.java index f8e0e30d425..6d9d8dc11fa 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/EStructuralFeatureTreeElementImpl.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/EStructuralFeatureTreeElementImpl.java @@ -4,247 +4,110 @@ * 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() + * 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 java.util.Collection; +import java.util.LinkedList; +import java.util.List; -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.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.EObjectContainmentWithInverseEList; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.emf.ecore.EStructuralFeature; 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.EStructuralFeatureTreeElement; -import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage; +import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeElement; /** - * * An implementation of the model object 'EStructural Feature Tree Element'. - * *

* The following features are implemented: *

    - *
  • {@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EStructuralFeatureTreeElementImpl#getParent Parent}
  • - *
  • {@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EStructuralFeatureTreeElementImpl#getReferedEObjectTE Refered EObject TE}
  • + *
  • {@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EStructuralFeatureTreeElementImpl#getParent Parent + * }
  • + *
  • {@link org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EStructuralFeatureTreeElementImpl#getReferedEObjectTE + * Refered EObject TE}
  • *
*

* - * @generated */ public class EStructuralFeatureTreeElementImpl extends TreeElementImpl implements EStructuralFeatureTreeElement { + /** * The cached value of the '{@link #getReferedEObjectTE() Refered EObject TE}' containment reference list. - * - * + * * @see #getReferedEObjectTE() - * @generated - * @ordered */ - protected EList referedEObjectTE; + protected List referedEObjectTE; - /** - * - * - * @generated - */ protected EStructuralFeatureTreeElementImpl() { super(); } - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return TreeproxyPackage.Literals.ESTRUCTURAL_FEATURE_TREE_ELEMENT; - } - - /** - * - * - * @generated - */ - public EObjectTreeElement getParent() { - if (eContainerFeatureID() != TreeproxyPackage.ESTRUCTURAL_FEATURE_TREE_ELEMENT__PARENT) return null; - return (EObjectTreeElement)eInternalContainer(); - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetParent(EObjectTreeElement newParent, NotificationChain msgs) { - msgs = eBasicSetContainer((InternalEObject)newParent, TreeproxyPackage.ESTRUCTURAL_FEATURE_TREE_ELEMENT__PARENT, msgs); - return msgs; - } - - /** - * - * - * @generated - */ - public void setParent(EObjectTreeElement newParent) { - if (newParent != eInternalContainer() || (eContainerFeatureID() != TreeproxyPackage.ESTRUCTURAL_FEATURE_TREE_ELEMENT__PARENT && newParent != null)) { - if (EcoreUtil.isAncestor(this, newParent)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newParent != null) - msgs = ((InternalEObject)newParent).eInverseAdd(this, TreeproxyPackage.EOBJECT_TREE_ELEMENT__SF_TREE_ELMEMENT, EObjectTreeElement.class, msgs); - msgs = basicSetParent(newParent, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TreeproxyPackage.ESTRUCTURAL_FEATURE_TREE_ELEMENT__PARENT, newParent, newParent)); - } - - /** - * - * - * @generated - */ - public EList getReferedEObjectTE() { - if (referedEObjectTE == null) { - referedEObjectTE = new EObjectContainmentWithInverseEList(EObjectTreeElement.class, this, TreeproxyPackage.ESTRUCTURAL_FEATURE_TREE_ELEMENT__REFERED_EOBJECT_TE, TreeproxyPackage.EOBJECT_TREE_ELEMENT__PARENT); + public List getReferedEObjectTE() { + if(referedEObjectTE == null) { + referedEObjectTE = new LinkedList(); } return referedEObjectTE; } /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case TreeproxyPackage.ESTRUCTURAL_FEATURE_TREE_ELEMENT__PARENT: - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - return basicSetParent((EObjectTreeElement)otherEnd, msgs); - case TreeproxyPackage.ESTRUCTURAL_FEATURE_TREE_ELEMENT__REFERED_EOBJECT_TE: - return ((InternalEList)(InternalEList)getReferedEObjectTE()).basicAdd(otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case TreeproxyPackage.ESTRUCTURAL_FEATURE_TREE_ELEMENT__PARENT: - return basicSetParent(null, msgs); - case TreeproxyPackage.ESTRUCTURAL_FEATURE_TREE_ELEMENT__REFERED_EOBJECT_TE: - return ((InternalEList)getReferedEObjectTE()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated + * Try to adapt this object to the requested type. + * Check if the underlying EObject ({@link #getEObject()}) can be adapted to the requested type. + * + * @param key + * @return */ - @Override - public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { - switch (eContainerFeatureID()) { - case TreeproxyPackage.ESTRUCTURAL_FEATURE_TREE_ELEMENT__PARENT: - return eInternalContainer().eInverseRemove(this, TreeproxyPackage.EOBJECT_TREE_ELEMENT__SF_TREE_ELMEMENT, EObjectTreeElement.class, msgs); + public Object getAdapter(Class key) { + if(key == EStructuralFeature.Setting.class) { //Metamodel element + EStructuralFeature.Setting result = new EStructuralFeature.Setting() { + + public void unset() { + getEObject().eUnset(getEStructuralFeature()); + } + + public void set(Object newValue) { + getEObject().eSet(getEStructuralFeature(), newValue); + } + + public boolean isSet() { + return getEObject().eIsSet(getEStructuralFeature()); + } + + public EStructuralFeature getEStructuralFeature() { + return getEStructuralFeature(); + } + + public EObject getEObject() { + return getEObject(); + } + + public Object get(boolean resolve) { + return getEObject().eGet(getEStructuralFeature(), resolve); + } + }; } - return super.eBasicRemoveFromContainerFeature(msgs); - } - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case TreeproxyPackage.ESTRUCTURAL_FEATURE_TREE_ELEMENT__PARENT: - return getParent(); - case TreeproxyPackage.ESTRUCTURAL_FEATURE_TREE_ELEMENT__REFERED_EOBJECT_TE: - return getReferedEObjectTE(); - } - return super.eGet(featureID, resolve, coreType); - } + //Semantic element + // Check if the underlying EObject can request to the adaptation + // The semantic EObject of a EReferenceTreeElement is the semantic EObject of it's parent (Which is an EObjectTreeElement) + final EObject model = getEObject(); - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case TreeproxyPackage.ESTRUCTURAL_FEATURE_TREE_ELEMENT__PARENT: - setParent((EObjectTreeElement)newValue); - return; - case TreeproxyPackage.ESTRUCTURAL_FEATURE_TREE_ELEMENT__REFERED_EOBJECT_TE: - getReferedEObjectTE().clear(); - getReferedEObjectTE().addAll((Collection)newValue); - return; + if(key.isInstance(model)) { + return model; } - super.eSet(featureID, newValue); - } - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case TreeproxyPackage.ESTRUCTURAL_FEATURE_TREE_ELEMENT__PARENT: - setParent((EObjectTreeElement)null); - return; - case TreeproxyPackage.ESTRUCTURAL_FEATURE_TREE_ELEMENT__REFERED_EOBJECT_TE: - getReferedEObjectTE().clear(); - return; - } - super.eUnset(featureID); + return null; } - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case TreeproxyPackage.ESTRUCTURAL_FEATURE_TREE_ELEMENT__PARENT: - return getParent() != null; - case TreeproxyPackage.ESTRUCTURAL_FEATURE_TREE_ELEMENT__REFERED_EOBJECT_TE: - return referedEObjectTE != null && !referedEObjectTE.isEmpty(); + // The semantic EObject of a EReferenceTreeElement is the semantic EObject of it's parent (Which is an EObjectTreeElement) + protected EObject getEObject() { + TreeElement parent = getParent(); + if(parent instanceof EObjectTreeElement) { //Should always be true + return ((EObjectTreeElement)parent).getEObject(); } - return super.eIsSet(featureID); - } - - public Object getAdapter(Class adapter) { return null; } 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/TreeElementImpl.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/TreeElementImpl.java index 52b8d23250d..96f328895b4 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/TreeElementImpl.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/TreeElementImpl.java @@ -4,55 +4,41 @@ * 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 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.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; 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.TreeproxyPackage; /** - * * An implementation of the model object 'Tree Element'. - * *

*

* - * @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 TreeproxySwitch modelSwitch = - new TreeproxySwitch() { - @Override - public Adapter caseTreeElement(TreeElement object) { - return createTreeElementAdapter(); - } - @Override - public Adapter caseEObjectTreeElement(EObjectTreeElement object) { - return createEObjectTreeElementAdapter(); - } - @Override - public Adapter caseEReferenceTreeElement(EReferenceTreeElement object) { - return createEReferenceTreeElementAdapter(); - } - @Override - public Adapter caseEAttributeTreeElement(EAttributeTreeElement object) { - return createEAttributeTreeElementAdapter(); - } - @Override - public Adapter caseEStructuralFeatureTreeElement(EStructuralFeatureTreeElement object) { - return createEStructuralFeatureTreeElementAdapter(); - } - @Override - public Adapter defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; - - /** - * Creates an adapter for the target. - * - * - * @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 TreeproxySwitch { - /** - * The cached model package - * - * - * @generated - */ - protected static TreeproxyPackage modelPackage; - - /** - * Creates an instance of the switch. - * - * - * @generated - */ - public TreeproxySwitch() { - if (modelPackage == null) { - modelPackage = TreeproxyPackage.eINSTANCE; - } - } - - /** - * 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 - */ - 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 { - List eSuperTypes = theEClass.getESuperTypes(); - return - eSuperTypes.isEmpty() ? - defaultCase(theEObject) : - doSwitch(eSuperTypes.get(0), 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(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