Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal')
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/EAttributeTreeElement.java62
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/EObjectTreeElement.java111
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/EReferenceTreeElement.java62
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/EStructuralFeatureTreeElement.java81
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/TreeElement.java33
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/TreeproxyFactory.java78
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/TreeproxyPackage.java518
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/impl/EAttributeTreeElementImpl.java165
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/impl/EObjectTreeElementImpl.java308
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/impl/EReferenceTreeElementImpl.java165
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/impl/EStructuralFeatureTreeElementImpl.java246
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/impl/TreeElementImpl.java60
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/impl/TreeproxyFactoryImpl.java137
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/impl/TreeproxyPackageImpl.java347
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/util/TreeproxyAdapterFactory.java201
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/internal/treeproxy/util/TreeproxySwitch.java225
16 files changed, 2799 insertions, 0 deletions
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
new file mode 100644
index 00000000000..af886255a1e
--- /dev/null
+++ 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
@@ -0,0 +1,62 @@
+/**
+ * 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.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy;
+
+import org.eclipse.emf.ecore.EAttribute;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>EAttribute Tree Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * Represents an EAttribute in a tree view
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EAttributeTreeElement#getEAttribute <em>EAttribute</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage#getEAttributeTreeElement()
+ * @model
+ * @generated
+ */
+public interface EAttributeTreeElement extends EStructuralFeatureTreeElement {
+ /**
+ * Returns the value of the '<em><b>EAttribute</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * The EAttribute represented by this tree element
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>EAttribute</em>' reference.
+ * @see #setEAttribute(EAttribute)
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage#getEAttributeTreeElement_EAttribute()
+ * @model
+ * @generated
+ */
+ EAttribute getEAttribute();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EAttributeTreeElement#getEAttribute <em>EAttribute</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>EAttribute</em>' reference.
+ * @see #getEAttribute()
+ * @generated
+ */
+ void setEAttribute(EAttribute value);
+
+} // EAttributeTreeElement
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
new file mode 100644
index 00000000000..f5b98b88435
--- /dev/null
+++ 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
@@ -0,0 +1,111 @@
+/**
+ * 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.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>EObject Tree Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * Represents a model element in a tree view
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement#getEObject <em>EObject</em>}</li>
+ * <li>{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement#getSfTreeElmement <em>Sf Tree Elmement</em>}</li>
+ * <li>{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement#getParent <em>Parent</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage#getEObjectTreeElement()
+ * @model
+ * @generated
+ */
+public interface EObjectTreeElement extends TreeElement {
+ /**
+ * Returns the value of the '<em><b>EObject</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * The model element represented by this tree element
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>EObject</em>' reference.
+ * @see #setEObject(EObject)
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage#getEObjectTreeElement_EObject()
+ * @model
+ * @generated
+ */
+ EObject getEObject();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement#getEObject <em>EObject</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>EObject</em>' reference.
+ * @see #getEObject()
+ * @generated
+ */
+ void setEObject(EObject value);
+
+ /**
+ * Returns the value of the '<em><b>Sf Tree Elmement</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement#getParent <em>Parent</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Sf Tree Elmement</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Sf Tree Elmement</em>' containment reference list.
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage#getEObjectTreeElement_SfTreeElmement()
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement#getParent
+ * @model opposite="parent" containment="true"
+ * @generated
+ */
+ EList<EStructuralFeatureTreeElement> getSfTreeElmement();
+
+ /**
+ * Returns the value of the '<em><b>Parent</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement#getReferedEObjectTE <em>Refered EObject TE</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Parent</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Parent</em>' container reference.
+ * @see #setParent(EStructuralFeatureTreeElement)
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage#getEObjectTreeElement_Parent()
+ * @see org.eclipse.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.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement#getParent <em>Parent</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Parent</em>' container reference.
+ * @see #getParent()
+ * @generated
+ */
+ void setParent(EStructuralFeatureTreeElement value);
+
+} // 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
new file mode 100644
index 00000000000..c755dfbc16c
--- /dev/null
+++ 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
@@ -0,0 +1,62 @@
+/**
+ * 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.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy;
+
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>EReference Tree Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * Represents an EReference as a link between two model elements in a tree view
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EReferenceTreeElement#getEReference <em>EReference</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage#getEReferenceTreeElement()
+ * @model
+ * @generated
+ */
+public interface EReferenceTreeElement extends EStructuralFeatureTreeElement {
+ /**
+ * Returns the value of the '<em><b>EReference</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * The EReference represented by this tree element
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>EReference</em>' reference.
+ * @see #setEReference(EReference)
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage#getEReferenceTreeElement_EReference()
+ * @model
+ * @generated
+ */
+ EReference getEReference();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EReferenceTreeElement#getEReference <em>EReference</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>EReference</em>' reference.
+ * @see #getEReference()
+ * @generated
+ */
+ void setEReference(EReference value);
+
+} // 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
new file mode 100644
index 00000000000..fd124dd8b5c
--- /dev/null
+++ 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
@@ -0,0 +1,81 @@
+/**
+ * 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.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy;
+
+import org.eclipse.emf.common.util.EList;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>EStructural Feature Tree Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement#getParent <em>Parent</em>}</li>
+ * <li>{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement#getReferedEObjectTE <em>Refered EObject TE</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage#getEStructuralFeatureTreeElement()
+ * @model
+ * @generated
+ */
+public interface EStructuralFeatureTreeElement extends TreeElement {
+
+ /**
+ * Returns the value of the '<em><b>Parent</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement#getSfTreeElmement <em>Sf Tree Elmement</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Parent</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Parent</em>' container reference.
+ * @see #setParent(EObjectTreeElement)
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage#getEStructuralFeatureTreeElement_Parent()
+ * @see org.eclipse.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.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement#getParent <em>Parent</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Parent</em>' container reference.
+ * @see #getParent()
+ * @generated
+ */
+ void setParent(EObjectTreeElement value);
+
+ /**
+ * Returns the value of the '<em><b>Refered EObject TE</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement#getParent <em>Parent</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Refered EObject TE</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Refered EObject TE</em>' containment reference list.
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage#getEStructuralFeatureTreeElement_ReferedEObjectTE()
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement#getParent
+ * @model opposite="parent" containment="true"
+ * @generated
+ */
+ EList<EObjectTreeElement> 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
new file mode 100644
index 00000000000..b236a36626a
--- /dev/null
+++ 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
@@ -0,0 +1,33 @@
+/**
+ * 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.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Tree Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * Represents a proxy element in a tree view
+ * <!-- end-model-doc -->
+ *
+ *
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage#getTreeElement()
+ * @model abstract="true"
+ * @generated
+ */
+public interface TreeElement extends EObject {
+
+} // 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
new file mode 100644
index 00000000000..b871e2719cc
--- /dev/null
+++ 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
@@ -0,0 +1,78 @@
+/**
+ * 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.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage
+ * @generated
+ */
+public interface TreeproxyFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ TreeproxyFactory eINSTANCE = org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.TreeproxyFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>EObject Tree Element</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>EObject Tree Element</em>'.
+ * @generated
+ */
+ EObjectTreeElement createEObjectTreeElement();
+
+ /**
+ * Returns a new object of class '<em>EReference Tree Element</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>EReference Tree Element</em>'.
+ * @generated
+ */
+ EReferenceTreeElement createEReferenceTreeElement();
+
+ /**
+ * Returns a new object of class '<em>EAttribute Tree Element</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>EAttribute Tree Element</em>'.
+ * @generated
+ */
+ EAttributeTreeElement createEAttributeTreeElement();
+
+ /**
+ * Returns a new object of class '<em>EStructural Feature Tree Element</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>EStructural Feature Tree Element</em>'.
+ * @generated
+ */
+ EStructuralFeatureTreeElement createEStructuralFeatureTreeElement();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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
new file mode 100644
index 00000000000..665d2d85b1f
--- /dev/null
+++ 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
@@ -0,0 +1,518 @@
+/**
+ * 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.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;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface TreeproxyPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "treeproxy";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/emf/facet/custom/0.2.incubation/internal/treeproxy";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "treeproxy";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ TreeproxyPackage eINSTANCE = org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.TreeproxyPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.TreeElementImpl <em>Tree Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.TreeElementImpl
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.TreeproxyPackageImpl#getTreeElement()
+ * @generated
+ */
+ int TREE_ELEMENT = 0;
+
+ /**
+ * The number of structural features of the '<em>Tree Element</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TREE_ELEMENT_FEATURE_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EObjectTreeElementImpl <em>EObject Tree Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EObjectTreeElementImpl
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.TreeproxyPackageImpl#getEObjectTreeElement()
+ * @generated
+ */
+ int EOBJECT_TREE_ELEMENT = 1;
+
+ /**
+ * The feature id for the '<em><b>EObject</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EOBJECT_TREE_ELEMENT__EOBJECT = TREE_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Sf Tree Elmement</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EOBJECT_TREE_ELEMENT__SF_TREE_ELMEMENT = TREE_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EOBJECT_TREE_ELEMENT__PARENT = TREE_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>EObject Tree Element</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EOBJECT_TREE_ELEMENT_FEATURE_COUNT = TREE_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EStructuralFeatureTreeElementImpl <em>EStructural Feature Tree Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EStructuralFeatureTreeElementImpl
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.TreeproxyPackageImpl#getEStructuralFeatureTreeElement()
+ * @generated
+ */
+ int ESTRUCTURAL_FEATURE_TREE_ELEMENT = 4;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ESTRUCTURAL_FEATURE_TREE_ELEMENT__PARENT = TREE_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Refered EObject TE</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ESTRUCTURAL_FEATURE_TREE_ELEMENT__REFERED_EOBJECT_TE = TREE_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>EStructural Feature Tree Element</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ESTRUCTURAL_FEATURE_TREE_ELEMENT_FEATURE_COUNT = TREE_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EReferenceTreeElementImpl <em>EReference Tree Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EReferenceTreeElementImpl
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.TreeproxyPackageImpl#getEReferenceTreeElement()
+ * @generated
+ */
+ int EREFERENCE_TREE_ELEMENT = 2;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EREFERENCE_TREE_ELEMENT__PARENT = ESTRUCTURAL_FEATURE_TREE_ELEMENT__PARENT;
+
+ /**
+ * The feature id for the '<em><b>Refered EObject TE</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EREFERENCE_TREE_ELEMENT__REFERED_EOBJECT_TE = ESTRUCTURAL_FEATURE_TREE_ELEMENT__REFERED_EOBJECT_TE;
+
+ /**
+ * The feature id for the '<em><b>EReference</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EREFERENCE_TREE_ELEMENT__EREFERENCE = ESTRUCTURAL_FEATURE_TREE_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>EReference Tree Element</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EREFERENCE_TREE_ELEMENT_FEATURE_COUNT = ESTRUCTURAL_FEATURE_TREE_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EAttributeTreeElementImpl <em>EAttribute Tree Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EAttributeTreeElementImpl
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.TreeproxyPackageImpl#getEAttributeTreeElement()
+ * @generated
+ */
+ int EATTRIBUTE_TREE_ELEMENT = 3;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EATTRIBUTE_TREE_ELEMENT__PARENT = ESTRUCTURAL_FEATURE_TREE_ELEMENT__PARENT;
+
+ /**
+ * The feature id for the '<em><b>Refered EObject TE</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EATTRIBUTE_TREE_ELEMENT__REFERED_EOBJECT_TE = ESTRUCTURAL_FEATURE_TREE_ELEMENT__REFERED_EOBJECT_TE;
+
+ /**
+ * The feature id for the '<em><b>EAttribute</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EATTRIBUTE_TREE_ELEMENT__EATTRIBUTE = ESTRUCTURAL_FEATURE_TREE_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>EAttribute Tree Element</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EATTRIBUTE_TREE_ELEMENT_FEATURE_COUNT = ESTRUCTURAL_FEATURE_TREE_ELEMENT_FEATURE_COUNT + 1;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeElement <em>Tree Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Tree Element</em>'.
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeElement
+ * @generated
+ */
+ EClass getTreeElement();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement <em>EObject Tree Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>EObject Tree Element</em>'.
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement
+ * @generated
+ */
+ EClass getEObjectTreeElement();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement#getEObject <em>EObject</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>EObject</em>'.
+ * @see org.eclipse.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.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement#getSfTreeElmement <em>Sf Tree Elmement</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Sf Tree Elmement</em>'.
+ * @see org.eclipse.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.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement#getParent <em>Parent</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Parent</em>'.
+ * @see org.eclipse.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.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EReferenceTreeElement <em>EReference Tree Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>EReference Tree Element</em>'.
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EReferenceTreeElement
+ * @generated
+ */
+ EClass getEReferenceTreeElement();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EReferenceTreeElement#getEReference <em>EReference</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>EReference</em>'.
+ * @see org.eclipse.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.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EAttributeTreeElement <em>EAttribute Tree Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>EAttribute Tree Element</em>'.
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EAttributeTreeElement
+ * @generated
+ */
+ EClass getEAttributeTreeElement();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EAttributeTreeElement#getEAttribute <em>EAttribute</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>EAttribute</em>'.
+ * @see org.eclipse.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.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement <em>EStructural Feature Tree Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>EStructural Feature Tree Element</em>'.
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement
+ * @generated
+ */
+ EClass getEStructuralFeatureTreeElement();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement#getParent <em>Parent</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Parent</em>'.
+ * @see org.eclipse.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.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement#getReferedEObjectTE <em>Refered EObject TE</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Refered EObject TE</em>'.
+ * @see org.eclipse.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.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ TreeproxyFactory getTreeproxyFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.TreeElementImpl <em>Tree Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.TreeElementImpl
+ * @see org.eclipse.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.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EObjectTreeElementImpl <em>EObject Tree Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EObjectTreeElementImpl
+ * @see org.eclipse.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 '<em><b>EObject</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference EOBJECT_TREE_ELEMENT__EOBJECT = eINSTANCE.getEObjectTreeElement_EObject();
+
+ /**
+ * The meta object literal for the '<em><b>Sf Tree Elmement</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference EOBJECT_TREE_ELEMENT__SF_TREE_ELMEMENT = eINSTANCE.getEObjectTreeElement_SfTreeElmement();
+
+ /**
+ * The meta object literal for the '<em><b>Parent</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference EOBJECT_TREE_ELEMENT__PARENT = eINSTANCE.getEObjectTreeElement_Parent();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EReferenceTreeElementImpl <em>EReference Tree Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EReferenceTreeElementImpl
+ * @see org.eclipse.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 '<em><b>EReference</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference EREFERENCE_TREE_ELEMENT__EREFERENCE = eINSTANCE.getEReferenceTreeElement_EReference();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EAttributeTreeElementImpl <em>EAttribute Tree Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EAttributeTreeElementImpl
+ * @see org.eclipse.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 '<em><b>EAttribute</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference EATTRIBUTE_TREE_ELEMENT__EATTRIBUTE = eINSTANCE.getEAttributeTreeElement_EAttribute();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EStructuralFeatureTreeElementImpl <em>EStructural Feature Tree Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EStructuralFeatureTreeElementImpl
+ * @see org.eclipse.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 '<em><b>Parent</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ESTRUCTURAL_FEATURE_TREE_ELEMENT__PARENT = eINSTANCE.getEStructuralFeatureTreeElement_Parent();
+
+ /**
+ * The meta object literal for the '<em><b>Refered EObject TE</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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/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
new file mode 100644
index 00000000000..e119d388e59
--- /dev/null
+++ 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
@@ -0,0 +1,165 @@
+/**
+ * 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.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.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EAttributeTreeElement;
+import org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>EAttribute Tree Element</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EAttributeTreeElementImpl#getEAttribute <em>EAttribute</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class EAttributeTreeElementImpl extends EStructuralFeatureTreeElementImpl implements EAttributeTreeElement {
+ /**
+ * The cached value of the '{@link #getEAttribute() <em>EAttribute</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getEAttribute()
+ * @generated
+ * @ordered
+ */
+ protected EAttribute eAttribute;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EAttributeTreeElementImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TreeproxyPackage.Literals.EATTRIBUTE_TREE_ELEMENT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute basicGetEAttribute() {
+ return eAttribute;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TreeproxyPackage.EATTRIBUTE_TREE_ELEMENT__EATTRIBUTE:
+ setEAttribute((EAttribute)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TreeproxyPackage.EATTRIBUTE_TREE_ELEMENT__EATTRIBUTE:
+ return eAttribute != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //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
new file mode 100644
index 00000000000..fe41c28b9f4
--- /dev/null
+++ 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
@@ -0,0 +1,308 @@
+/**
+ * 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.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.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.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement;
+import org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement;
+import org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>EObject Tree Element</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EObjectTreeElementImpl#getEObject <em>EObject</em>}</li>
+ * <li>{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EObjectTreeElementImpl#getSfTreeElmement <em>Sf Tree Elmement</em>}</li>
+ * <li>{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EObjectTreeElementImpl#getParent <em>Parent</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class EObjectTreeElementImpl extends TreeElementImpl implements EObjectTreeElement {
+ /**
+ * The cached value of the '{@link #getEObject() <em>EObject</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getEObject()
+ * @generated
+ * @ordered
+ */
+ protected EObject eObject;
+
+ /**
+ * The cached value of the '{@link #getSfTreeElmement() <em>Sf Tree Elmement</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSfTreeElmement()
+ * @generated
+ * @ordered
+ */
+ protected EList<EStructuralFeatureTreeElement> sfTreeElmement;
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EObjectTreeElementImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TreeproxyPackage.Literals.EOBJECT_TREE_ELEMENT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EObject basicGetEObject() {
+ return eObject;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<EStructuralFeatureTreeElement> getSfTreeElmement() {
+ if (sfTreeElmement == null) {
+ sfTreeElmement = new EObjectContainmentWithInverseEList<EStructuralFeatureTreeElement>(EStructuralFeatureTreeElement.class, this, TreeproxyPackage.EOBJECT_TREE_ELEMENT__SF_TREE_ELMEMENT, TreeproxyPackage.ESTRUCTURAL_FEATURE_TREE_ELEMENT__PARENT);
+ }
+ return sfTreeElmement;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EStructuralFeatureTreeElement getParent() {
+ if (eContainerFeatureID() != TreeproxyPackage.EOBJECT_TREE_ELEMENT__PARENT) return null;
+ return (EStructuralFeatureTreeElement)eContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetParent(EStructuralFeatureTreeElement newParent, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject)newParent, TreeproxyPackage.EOBJECT_TREE_ELEMENT__PARENT, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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<InternalEObject>)(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);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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<? extends EStructuralFeatureTreeElement>)newValue);
+ return;
+ case TreeproxyPackage.EOBJECT_TREE_ELEMENT__PARENT:
+ setParent((EStructuralFeatureTreeElement)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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);
+ }
+
+} //EObjectTreeElementImpl
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
new file mode 100644
index 00000000000..1879885ebf8
--- /dev/null
+++ 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
@@ -0,0 +1,165 @@
+/**
+ * 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.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.EReference;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EReferenceTreeElement;
+import org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>EReference Tree Element</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EReferenceTreeElementImpl#getEReference <em>EReference</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class EReferenceTreeElementImpl extends EStructuralFeatureTreeElementImpl implements EReferenceTreeElement {
+ /**
+ * The cached value of the '{@link #getEReference() <em>EReference</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getEReference()
+ * @generated
+ * @ordered
+ */
+ protected EReference eReference;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EReferenceTreeElementImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TreeproxyPackage.Literals.EREFERENCE_TREE_ELEMENT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference basicGetEReference() {
+ return eReference;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TreeproxyPackage.EREFERENCE_TREE_ELEMENT__EREFERENCE:
+ setEReference((EReference)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TreeproxyPackage.EREFERENCE_TREE_ELEMENT__EREFERENCE:
+ return eReference != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //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
new file mode 100644
index 00000000000..bca7fb2b4d9
--- /dev/null
+++ 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
@@ -0,0 +1,246 @@
+/**
+ * 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.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.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.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement;
+import org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement;
+import org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>EStructural Feature Tree Element</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EStructuralFeatureTreeElementImpl#getParent <em>Parent</em>}</li>
+ * <li>{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.impl.EStructuralFeatureTreeElementImpl#getReferedEObjectTE <em>Refered EObject TE</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class EStructuralFeatureTreeElementImpl extends TreeElementImpl implements EStructuralFeatureTreeElement {
+ /**
+ * The cached value of the '{@link #getReferedEObjectTE() <em>Refered EObject TE</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getReferedEObjectTE()
+ * @generated
+ * @ordered
+ */
+ protected EList<EObjectTreeElement> referedEObjectTE;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EStructuralFeatureTreeElementImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TreeproxyPackage.Literals.ESTRUCTURAL_FEATURE_TREE_ELEMENT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EObjectTreeElement getParent() {
+ if (eContainerFeatureID() != TreeproxyPackage.ESTRUCTURAL_FEATURE_TREE_ELEMENT__PARENT) return null;
+ return (EObjectTreeElement)eContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetParent(EObjectTreeElement newParent, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject)newParent, TreeproxyPackage.ESTRUCTURAL_FEATURE_TREE_ELEMENT__PARENT, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<EObjectTreeElement> getReferedEObjectTE() {
+ if (referedEObjectTE == null) {
+ referedEObjectTE = new EObjectContainmentWithInverseEList<EObjectTreeElement>(EObjectTreeElement.class, this, TreeproxyPackage.ESTRUCTURAL_FEATURE_TREE_ELEMENT__REFERED_EOBJECT_TE, TreeproxyPackage.EOBJECT_TREE_ELEMENT__PARENT);
+ }
+ return referedEObjectTE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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<InternalEObject>)(InternalEList<?>)getReferedEObjectTE()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case 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);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @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);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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<? extends EObjectTreeElement>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //EStructuralFeatureTreeElementImpl
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
new file mode 100644
index 00000000000..0c4c73369cc
--- /dev/null
+++ 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
@@ -0,0 +1,60 @@
+/**
+ * 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.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.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeElement;
+import org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Tree Element</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class TreeElementImpl extends EObjectImpl implements TreeElement {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeElementImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TreeproxyPackage.Literals.TREE_ELEMENT;
+ }
+
+} //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
new file mode 100644
index 00000000000..5ce3653fcf6
--- /dev/null
+++ 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
@@ -0,0 +1,137 @@
+/**
+ * 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.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.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TreeproxyFactoryImpl extends EFactoryImpl implements TreeproxyFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static TreeproxyFactory init() {
+ try {
+ TreeproxyFactory theTreeproxyFactory = (TreeproxyFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/emf/facet/custom/0.2.incubation/internal/treeproxy");
+ if (theTreeproxyFactory != null) {
+ return theTreeproxyFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new TreeproxyFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TreeproxyFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EObjectTreeElement createEObjectTreeElement() {
+ EObjectTreeElementImpl eObjectTreeElement = new EObjectTreeElementImpl();
+ return eObjectTreeElement;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReferenceTreeElement createEReferenceTreeElement() {
+ EReferenceTreeElementImpl eReferenceTreeElement = new EReferenceTreeElementImpl();
+ return eReferenceTreeElement;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttributeTreeElement createEAttributeTreeElement() {
+ EAttributeTreeElementImpl eAttributeTreeElement = new EAttributeTreeElementImpl();
+ return eAttributeTreeElement;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EStructuralFeatureTreeElement createEStructuralFeatureTreeElement() {
+ EStructuralFeatureTreeElementImpl eStructuralFeatureTreeElement = new EStructuralFeatureTreeElementImpl();
+ return eStructuralFeatureTreeElement;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TreeproxyPackage getTreeproxyPackage() {
+ return (TreeproxyPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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
new file mode 100644
index 00000000000..76970d9b106
--- /dev/null
+++ 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
@@ -0,0 +1,347 @@
+/**
+ * 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.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.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EAttributeTreeElement;
+import org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement;
+import org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EReferenceTreeElement;
+import org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement;
+import org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeElement;
+import org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyFactory;
+import org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TreeproxyPackageImpl extends EPackageImpl implements TreeproxyPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass treeElementEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass eObjectTreeElementEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass eReferenceTreeElementEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass eAttributeTreeElementEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass eStructuralFeatureTreeElementEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private TreeproxyPackageImpl() {
+ super(eNS_URI, TreeproxyFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link TreeproxyPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static 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;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTreeElement() {
+ return treeElementEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getEObjectTreeElement() {
+ return eObjectTreeElementEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getEObjectTreeElement_EObject() {
+ return (EReference)eObjectTreeElementEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getEObjectTreeElement_SfTreeElmement() {
+ return (EReference)eObjectTreeElementEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getEObjectTreeElement_Parent() {
+ return (EReference)eObjectTreeElementEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getEReferenceTreeElement() {
+ return eReferenceTreeElementEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getEReferenceTreeElement_EReference() {
+ return (EReference)eReferenceTreeElementEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getEAttributeTreeElement() {
+ return eAttributeTreeElementEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getEAttributeTreeElement_EAttribute() {
+ return (EReference)eAttributeTreeElementEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getEStructuralFeatureTreeElement() {
+ return eStructuralFeatureTreeElementEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getEStructuralFeatureTreeElement_Parent() {
+ return (EReference)eStructuralFeatureTreeElementEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getEStructuralFeatureTreeElement_ReferedEObjectTE() {
+ return (EReference)eStructuralFeatureTreeElementEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TreeproxyFactory getTreeproxyFactory() {
+ return (TreeproxyFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ 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);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ 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
new file mode 100644
index 00000000000..1f08371a747
--- /dev/null
+++ 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
@@ -0,0 +1,201 @@
+/**
+ * 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.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.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage
+ * @generated
+ */
+public class TreeproxyAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static TreeproxyPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TreeproxyAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = TreeproxyPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeproxySwitch<Adapter> modelSwitch =
+ new TreeproxySwitch<Adapter>() {
+ @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 <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeElement <em>Tree Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.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.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement <em>EObject Tree Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.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.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EReferenceTreeElement <em>EReference Tree Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.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.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EAttributeTreeElement <em>EAttribute Tree Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.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.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement <em>EStructural Feature Tree Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement
+ * @generated
+ */
+ public Adapter createEStructuralFeatureTreeElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //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
new file mode 100644
index 00000000000..6ac29251415
--- /dev/null
+++ 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
@@ -0,0 +1,225 @@
+/**
+ * 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.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.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyPackage
+ * @generated
+ */
+public class TreeproxySwitch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static TreeproxyPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TreeproxySwitch() {
+ if (modelPackage == null) {
+ modelPackage = TreeproxyPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ public T doSwitch(EObject theEObject) {
+ return doSwitch(theEObject.eClass(), theEObject);
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ protected T doSwitch(EClass theEClass, EObject theEObject) {
+ if (theEClass.eContainer() == modelPackage) {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ }
+ else {
+ List<EClass> eSuperTypes = theEClass.getESuperTypes();
+ return
+ eSuperTypes.isEmpty() ?
+ defaultCase(theEObject) :
+ doSwitch(eSuperTypes.get(0), theEObject);
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ 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 '<em>Tree Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Tree Element</em>'.
+ * @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 '<em>EObject Tree Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject Tree Element</em>'.
+ * @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 '<em>EReference Tree Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EReference Tree Element</em>'.
+ * @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 '<em>EAttribute Tree Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EAttribute Tree Element</em>'.
+ * @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 '<em>EStructural Feature Tree Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EStructural Feature Tree Element</em>'.
+ * @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 '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //TreeproxySwitch

Back to the top