Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley')
-rw-r--r--examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/Account.java96
-rw-r--r--examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/Folder.java84
-rw-r--r--examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/FolderContent.java18
-rw-r--r--examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/Mail.java123
-rw-r--r--examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/MailContent.java17
-rw-r--r--examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/MailFactory.java69
-rw-r--r--examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/MailPackage.java558
-rw-r--r--examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/AccountImpl.java276
-rw-r--r--examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/FolderContentImpl.java41
-rw-r--r--examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/FolderImpl.java257
-rw-r--r--examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/MailContentImpl.java39
-rw-r--r--examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/MailFactoryImpl.java128
-rw-r--r--examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/MailImpl.java314
-rw-r--r--examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/MailPackageImpl.java363
-rw-r--r--examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/util/MailAdapterFactory.java192
-rw-r--r--examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/util/MailSwitch.java196
16 files changed, 2771 insertions, 0 deletions
diff --git a/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/Account.java b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/Account.java
new file mode 100644
index 000000000..c7fccbe46
--- /dev/null
+++ b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/Account.java
@@ -0,0 +1,96 @@
+/**
+ */
+package org.eclipse.emf.parsley.examples.mail;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Account</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.parsley.examples.mail.Account#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.parsley.examples.mail.Account#getEmail <em>Email</em>}</li>
+ * <li>{@link org.eclipse.emf.parsley.examples.mail.Account#getFolders <em>Folders</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.parsley.examples.mail.MailPackage#getAccount()
+ * @model
+ * @generated
+ */
+public interface Account extends EObject {
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.emf.parsley.examples.mail.MailPackage#getAccount_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.parsley.examples.mail.Account#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Email</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Email</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Email</em>' attribute.
+ * @see #setEmail(String)
+ * @see org.eclipse.emf.parsley.examples.mail.MailPackage#getAccount_Email()
+ * @model
+ * @generated
+ */
+ String getEmail();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.parsley.examples.mail.Account#getEmail <em>Email</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Email</em>' attribute.
+ * @see #getEmail()
+ * @generated
+ */
+ void setEmail(String value);
+
+ /**
+ * Returns the value of the '<em><b>Folders</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.parsley.examples.mail.Folder}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Folders</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>Folders</em>' containment reference list.
+ * @see org.eclipse.emf.parsley.examples.mail.MailPackage#getAccount_Folders()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Folder> getFolders();
+
+} // Account
diff --git a/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/Folder.java b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/Folder.java
new file mode 100644
index 000000000..4d9e55740
--- /dev/null
+++ b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/Folder.java
@@ -0,0 +1,84 @@
+/**
+ */
+package org.eclipse.emf.parsley.examples.mail;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Folder</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.parsley.examples.mail.Folder#getSubfolders <em>Subfolders</em>}</li>
+ * <li>{@link org.eclipse.emf.parsley.examples.mail.Folder#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.parsley.examples.mail.Folder#getMails <em>Mails</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.parsley.examples.mail.MailPackage#getFolder()
+ * @model
+ * @generated
+ */
+public interface Folder extends FolderContent {
+ /**
+ * Returns the value of the '<em><b>Subfolders</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.parsley.examples.mail.Folder}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Subfolders</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>Subfolders</em>' containment reference list.
+ * @see org.eclipse.emf.parsley.examples.mail.MailPackage#getFolder_Subfolders()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Folder> getSubfolders();
+
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.emf.parsley.examples.mail.MailPackage#getFolder_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.parsley.examples.mail.Folder#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Mails</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.parsley.examples.mail.Mail}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Mails</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>Mails</em>' containment reference list.
+ * @see org.eclipse.emf.parsley.examples.mail.MailPackage#getFolder_Mails()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Mail> getMails();
+
+} // Folder
diff --git a/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/FolderContent.java b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/FolderContent.java
new file mode 100644
index 000000000..317362879
--- /dev/null
+++ b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/FolderContent.java
@@ -0,0 +1,18 @@
+/**
+ */
+package org.eclipse.emf.parsley.examples.mail;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Folder Content</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.emf.parsley.examples.mail.MailPackage#getFolderContent()
+ * @model abstract="true"
+ * @generated
+ */
+public interface FolderContent extends EObject {
+} // FolderContent
diff --git a/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/Mail.java b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/Mail.java
new file mode 100644
index 000000000..165c874d6
--- /dev/null
+++ b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/Mail.java
@@ -0,0 +1,123 @@
+/**
+ */
+package org.eclipse.emf.parsley.examples.mail;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Mail</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.parsley.examples.mail.Mail#getFrom <em>From</em>}</li>
+ * <li>{@link org.eclipse.emf.parsley.examples.mail.Mail#getRecipients <em>Recipients</em>}</li>
+ * <li>{@link org.eclipse.emf.parsley.examples.mail.Mail#getMessage <em>Message</em>}</li>
+ * <li>{@link org.eclipse.emf.parsley.examples.mail.Mail#getSubject <em>Subject</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.parsley.examples.mail.MailPackage#getMail()
+ * @model
+ * @generated
+ */
+public interface Mail extends EObject {
+ /**
+ * Returns the value of the '<em><b>From</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>From</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>From</em>' attribute.
+ * @see #setFrom(String)
+ * @see org.eclipse.emf.parsley.examples.mail.MailPackage#getMail_From()
+ * @model
+ * @generated
+ */
+ String getFrom();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.parsley.examples.mail.Mail#getFrom <em>From</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>From</em>' attribute.
+ * @see #getFrom()
+ * @generated
+ */
+ void setFrom(String value);
+
+ /**
+ * Returns the value of the '<em><b>Recipients</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.String}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Recipients</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Recipients</em>' attribute list.
+ * @see org.eclipse.emf.parsley.examples.mail.MailPackage#getMail_Recipients()
+ * @model
+ * @generated
+ */
+ EList<String> getRecipients();
+
+ /**
+ * Returns the value of the '<em><b>Message</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Message</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Message</em>' attribute.
+ * @see #setMessage(String)
+ * @see org.eclipse.emf.parsley.examples.mail.MailPackage#getMail_Message()
+ * @model
+ * @generated
+ */
+ String getMessage();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.parsley.examples.mail.Mail#getMessage <em>Message</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Message</em>' attribute.
+ * @see #getMessage()
+ * @generated
+ */
+ void setMessage(String value);
+
+ /**
+ * Returns the value of the '<em><b>Subject</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Subject</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Subject</em>' attribute.
+ * @see #setSubject(String)
+ * @see org.eclipse.emf.parsley.examples.mail.MailPackage#getMail_Subject()
+ * @model
+ * @generated
+ */
+ String getSubject();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.parsley.examples.mail.Mail#getSubject <em>Subject</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Subject</em>' attribute.
+ * @see #getSubject()
+ * @generated
+ */
+ void setSubject(String value);
+
+} // Mail
diff --git a/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/MailContent.java b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/MailContent.java
new file mode 100644
index 000000000..f5c83c80a
--- /dev/null
+++ b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/MailContent.java
@@ -0,0 +1,17 @@
+/**
+ */
+package org.eclipse.emf.parsley.examples.mail;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Content</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.emf.parsley.examples.mail.MailPackage#getMailContent()
+ * @model
+ * @generated
+ */
+public interface MailContent extends FolderContent {
+} // MailContent
diff --git a/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/MailFactory.java b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/MailFactory.java
new file mode 100644
index 000000000..cbc299505
--- /dev/null
+++ b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/MailFactory.java
@@ -0,0 +1,69 @@
+/**
+ */
+package org.eclipse.emf.parsley.examples.mail;
+
+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.parsley.examples.mail.MailPackage
+ * @generated
+ */
+public interface MailFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ MailFactory eINSTANCE = org.eclipse.emf.parsley.examples.mail.impl.MailFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Account</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Account</em>'.
+ * @generated
+ */
+ Account createAccount();
+
+ /**
+ * Returns a new object of class '<em>Folder</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Folder</em>'.
+ * @generated
+ */
+ Folder createFolder();
+
+ /**
+ * Returns a new object of class '<em>Content</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Content</em>'.
+ * @generated
+ */
+ MailContent createMailContent();
+
+ /**
+ * Returns a new object of class '<em>Mail</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Mail</em>'.
+ * @generated
+ */
+ Mail createMail();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ MailPackage getMailPackage();
+
+} //MailFactory
diff --git a/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/MailPackage.java b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/MailPackage.java
new file mode 100644
index 000000000..0eba02c95
--- /dev/null
+++ b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/MailPackage.java
@@ -0,0 +1,558 @@
+/**
+ */
+package org.eclipse.emf.parsley.examples.mail;
+
+import org.eclipse.emf.ecore.EAttribute;
+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.parsley.examples.mail.MailFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface MailPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "mail";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http:///org/eclipse/emf/parsley/examples/mail/mail.ecore/0.1.0";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "mail";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ MailPackage eINSTANCE = org.eclipse.emf.parsley.examples.mail.impl.MailPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.parsley.examples.mail.impl.AccountImpl <em>Account</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.parsley.examples.mail.impl.AccountImpl
+ * @see org.eclipse.emf.parsley.examples.mail.impl.MailPackageImpl#getAccount()
+ * @generated
+ */
+ int ACCOUNT = 0;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACCOUNT__NAME = 0;
+
+ /**
+ * The feature id for the '<em><b>Email</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACCOUNT__EMAIL = 1;
+
+ /**
+ * The feature id for the '<em><b>Folders</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACCOUNT__FOLDERS = 2;
+
+ /**
+ * The number of structural features of the '<em>Account</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACCOUNT_FEATURE_COUNT = 3;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.parsley.examples.mail.impl.FolderContentImpl <em>Folder Content</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.parsley.examples.mail.impl.FolderContentImpl
+ * @see org.eclipse.emf.parsley.examples.mail.impl.MailPackageImpl#getFolderContent()
+ * @generated
+ */
+ int FOLDER_CONTENT = 2;
+
+ /**
+ * The number of structural features of the '<em>Folder Content</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FOLDER_CONTENT_FEATURE_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.parsley.examples.mail.impl.FolderImpl <em>Folder</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.parsley.examples.mail.impl.FolderImpl
+ * @see org.eclipse.emf.parsley.examples.mail.impl.MailPackageImpl#getFolder()
+ * @generated
+ */
+ int FOLDER = 1;
+
+ /**
+ * The feature id for the '<em><b>Subfolders</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FOLDER__SUBFOLDERS = FOLDER_CONTENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FOLDER__NAME = FOLDER_CONTENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Mails</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FOLDER__MAILS = FOLDER_CONTENT_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>Folder</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FOLDER_FEATURE_COUNT = FOLDER_CONTENT_FEATURE_COUNT + 3;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.parsley.examples.mail.impl.MailContentImpl <em>Content</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.parsley.examples.mail.impl.MailContentImpl
+ * @see org.eclipse.emf.parsley.examples.mail.impl.MailPackageImpl#getMailContent()
+ * @generated
+ */
+ int MAIL_CONTENT = 3;
+
+ /**
+ * The number of structural features of the '<em>Content</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAIL_CONTENT_FEATURE_COUNT = FOLDER_CONTENT_FEATURE_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.parsley.examples.mail.impl.MailImpl <em>Mail</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.parsley.examples.mail.impl.MailImpl
+ * @see org.eclipse.emf.parsley.examples.mail.impl.MailPackageImpl#getMail()
+ * @generated
+ */
+ int MAIL = 4;
+
+ /**
+ * The feature id for the '<em><b>From</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAIL__FROM = 0;
+
+ /**
+ * The feature id for the '<em><b>Recipients</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAIL__RECIPIENTS = 1;
+
+ /**
+ * The feature id for the '<em><b>Message</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAIL__MESSAGE = 2;
+
+ /**
+ * The feature id for the '<em><b>Subject</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAIL__SUBJECT = 3;
+
+ /**
+ * The number of structural features of the '<em>Mail</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAIL_FEATURE_COUNT = 4;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.parsley.examples.mail.Account <em>Account</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Account</em>'.
+ * @see org.eclipse.emf.parsley.examples.mail.Account
+ * @generated
+ */
+ EClass getAccount();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.parsley.examples.mail.Account#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.emf.parsley.examples.mail.Account#getName()
+ * @see #getAccount()
+ * @generated
+ */
+ EAttribute getAccount_Name();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.parsley.examples.mail.Account#getEmail <em>Email</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Email</em>'.
+ * @see org.eclipse.emf.parsley.examples.mail.Account#getEmail()
+ * @see #getAccount()
+ * @generated
+ */
+ EAttribute getAccount_Email();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.emf.parsley.examples.mail.Account#getFolders <em>Folders</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Folders</em>'.
+ * @see org.eclipse.emf.parsley.examples.mail.Account#getFolders()
+ * @see #getAccount()
+ * @generated
+ */
+ EReference getAccount_Folders();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.parsley.examples.mail.Folder <em>Folder</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Folder</em>'.
+ * @see org.eclipse.emf.parsley.examples.mail.Folder
+ * @generated
+ */
+ EClass getFolder();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.emf.parsley.examples.mail.Folder#getSubfolders <em>Subfolders</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Subfolders</em>'.
+ * @see org.eclipse.emf.parsley.examples.mail.Folder#getSubfolders()
+ * @see #getFolder()
+ * @generated
+ */
+ EReference getFolder_Subfolders();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.parsley.examples.mail.Folder#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.emf.parsley.examples.mail.Folder#getName()
+ * @see #getFolder()
+ * @generated
+ */
+ EAttribute getFolder_Name();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.emf.parsley.examples.mail.Folder#getMails <em>Mails</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Mails</em>'.
+ * @see org.eclipse.emf.parsley.examples.mail.Folder#getMails()
+ * @see #getFolder()
+ * @generated
+ */
+ EReference getFolder_Mails();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.parsley.examples.mail.FolderContent <em>Folder Content</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Folder Content</em>'.
+ * @see org.eclipse.emf.parsley.examples.mail.FolderContent
+ * @generated
+ */
+ EClass getFolderContent();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.parsley.examples.mail.MailContent <em>Content</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Content</em>'.
+ * @see org.eclipse.emf.parsley.examples.mail.MailContent
+ * @generated
+ */
+ EClass getMailContent();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.parsley.examples.mail.Mail <em>Mail</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Mail</em>'.
+ * @see org.eclipse.emf.parsley.examples.mail.Mail
+ * @generated
+ */
+ EClass getMail();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.parsley.examples.mail.Mail#getFrom <em>From</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>From</em>'.
+ * @see org.eclipse.emf.parsley.examples.mail.Mail#getFrom()
+ * @see #getMail()
+ * @generated
+ */
+ EAttribute getMail_From();
+
+ /**
+ * Returns the meta object for the attribute list '{@link org.eclipse.emf.parsley.examples.mail.Mail#getRecipients <em>Recipients</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute list '<em>Recipients</em>'.
+ * @see org.eclipse.emf.parsley.examples.mail.Mail#getRecipients()
+ * @see #getMail()
+ * @generated
+ */
+ EAttribute getMail_Recipients();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.parsley.examples.mail.Mail#getMessage <em>Message</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Message</em>'.
+ * @see org.eclipse.emf.parsley.examples.mail.Mail#getMessage()
+ * @see #getMail()
+ * @generated
+ */
+ EAttribute getMail_Message();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.parsley.examples.mail.Mail#getSubject <em>Subject</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Subject</em>'.
+ * @see org.eclipse.emf.parsley.examples.mail.Mail#getSubject()
+ * @see #getMail()
+ * @generated
+ */
+ EAttribute getMail_Subject();
+
+ /**
+ * 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
+ */
+ MailFactory getMailFactory();
+
+ /**
+ * <!-- 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.parsley.examples.mail.impl.AccountImpl <em>Account</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.parsley.examples.mail.impl.AccountImpl
+ * @see org.eclipse.emf.parsley.examples.mail.impl.MailPackageImpl#getAccount()
+ * @generated
+ */
+ EClass ACCOUNT = eINSTANCE.getAccount();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ACCOUNT__NAME = eINSTANCE.getAccount_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Email</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ACCOUNT__EMAIL = eINSTANCE.getAccount_Email();
+
+ /**
+ * The meta object literal for the '<em><b>Folders</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ACCOUNT__FOLDERS = eINSTANCE.getAccount_Folders();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.parsley.examples.mail.impl.FolderImpl <em>Folder</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.parsley.examples.mail.impl.FolderImpl
+ * @see org.eclipse.emf.parsley.examples.mail.impl.MailPackageImpl#getFolder()
+ * @generated
+ */
+ EClass FOLDER = eINSTANCE.getFolder();
+
+ /**
+ * The meta object literal for the '<em><b>Subfolders</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference FOLDER__SUBFOLDERS = eINSTANCE.getFolder_Subfolders();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute FOLDER__NAME = eINSTANCE.getFolder_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Mails</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference FOLDER__MAILS = eINSTANCE.getFolder_Mails();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.parsley.examples.mail.impl.FolderContentImpl <em>Folder Content</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.parsley.examples.mail.impl.FolderContentImpl
+ * @see org.eclipse.emf.parsley.examples.mail.impl.MailPackageImpl#getFolderContent()
+ * @generated
+ */
+ EClass FOLDER_CONTENT = eINSTANCE.getFolderContent();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.parsley.examples.mail.impl.MailContentImpl <em>Content</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.parsley.examples.mail.impl.MailContentImpl
+ * @see org.eclipse.emf.parsley.examples.mail.impl.MailPackageImpl#getMailContent()
+ * @generated
+ */
+ EClass MAIL_CONTENT = eINSTANCE.getMailContent();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.parsley.examples.mail.impl.MailImpl <em>Mail</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.parsley.examples.mail.impl.MailImpl
+ * @see org.eclipse.emf.parsley.examples.mail.impl.MailPackageImpl#getMail()
+ * @generated
+ */
+ EClass MAIL = eINSTANCE.getMail();
+
+ /**
+ * The meta object literal for the '<em><b>From</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute MAIL__FROM = eINSTANCE.getMail_From();
+
+ /**
+ * The meta object literal for the '<em><b>Recipients</b></em>' attribute list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute MAIL__RECIPIENTS = eINSTANCE.getMail_Recipients();
+
+ /**
+ * The meta object literal for the '<em><b>Message</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute MAIL__MESSAGE = eINSTANCE.getMail_Message();
+
+ /**
+ * The meta object literal for the '<em><b>Subject</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute MAIL__SUBJECT = eINSTANCE.getMail_Subject();
+
+ }
+
+} //MailPackage
diff --git a/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/AccountImpl.java b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/AccountImpl.java
new file mode 100644
index 000000000..1f3699882
--- /dev/null
+++ b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/AccountImpl.java
@@ -0,0 +1,276 @@
+/**
+ */
+package org.eclipse.emf.parsley.examples.mail.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.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.emf.parsley.examples.mail.Account;
+import org.eclipse.emf.parsley.examples.mail.Folder;
+import org.eclipse.emf.parsley.examples.mail.MailPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Account</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.parsley.examples.mail.impl.AccountImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.parsley.examples.mail.impl.AccountImpl#getEmail <em>Email</em>}</li>
+ * <li>{@link org.eclipse.emf.parsley.examples.mail.impl.AccountImpl#getFolders <em>Folders</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class AccountImpl extends EObjectImpl implements Account {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getEmail() <em>Email</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getEmail()
+ * @generated
+ * @ordered
+ */
+ protected static final String EMAIL_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getEmail() <em>Email</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getEmail()
+ * @generated
+ * @ordered
+ */
+ protected String email = EMAIL_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getFolders() <em>Folders</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFolders()
+ * @generated
+ * @ordered
+ */
+ protected EList<Folder> folders;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AccountImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return MailPackage.Literals.ACCOUNT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, MailPackage.ACCOUNT__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getEmail() {
+ return email;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setEmail(String newEmail) {
+ String oldEmail = email;
+ email = newEmail;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, MailPackage.ACCOUNT__EMAIL, oldEmail, email));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Folder> getFolders() {
+ if (folders == null) {
+ folders = new EObjectContainmentEList<Folder>(Folder.class, this, MailPackage.ACCOUNT__FOLDERS);
+ }
+ return folders;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case MailPackage.ACCOUNT__FOLDERS:
+ return ((InternalEList<?>)getFolders()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case MailPackage.ACCOUNT__NAME:
+ return getName();
+ case MailPackage.ACCOUNT__EMAIL:
+ return getEmail();
+ case MailPackage.ACCOUNT__FOLDERS:
+ return getFolders();
+ }
+ 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 MailPackage.ACCOUNT__NAME:
+ setName((String)newValue);
+ return;
+ case MailPackage.ACCOUNT__EMAIL:
+ setEmail((String)newValue);
+ return;
+ case MailPackage.ACCOUNT__FOLDERS:
+ getFolders().clear();
+ getFolders().addAll((Collection<? extends Folder>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case MailPackage.ACCOUNT__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case MailPackage.ACCOUNT__EMAIL:
+ setEmail(EMAIL_EDEFAULT);
+ return;
+ case MailPackage.ACCOUNT__FOLDERS:
+ getFolders().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case MailPackage.ACCOUNT__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case MailPackage.ACCOUNT__EMAIL:
+ return EMAIL_EDEFAULT == null ? email != null : !EMAIL_EDEFAULT.equals(email);
+ case MailPackage.ACCOUNT__FOLDERS:
+ return folders != null && !folders.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(", email: ");
+ result.append(email);
+ result.append(')');
+ return result.toString();
+ }
+
+} //AccountImpl
diff --git a/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/FolderContentImpl.java b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/FolderContentImpl.java
new file mode 100644
index 000000000..d01bac11b
--- /dev/null
+++ b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/FolderContentImpl.java
@@ -0,0 +1,41 @@
+/**
+ */
+package org.eclipse.emf.parsley.examples.mail.impl;
+
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.emf.parsley.examples.mail.FolderContent;
+import org.eclipse.emf.parsley.examples.mail.MailPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Folder Content</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class FolderContentImpl extends EObjectImpl implements FolderContent {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected FolderContentImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return MailPackage.Literals.FOLDER_CONTENT;
+ }
+
+} //FolderContentImpl
diff --git a/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/FolderImpl.java b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/FolderImpl.java
new file mode 100644
index 000000000..552e900e4
--- /dev/null
+++ b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/FolderImpl.java
@@ -0,0 +1,257 @@
+/**
+ */
+package org.eclipse.emf.parsley.examples.mail.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.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.emf.parsley.examples.mail.Folder;
+import org.eclipse.emf.parsley.examples.mail.Mail;
+import org.eclipse.emf.parsley.examples.mail.MailPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Folder</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.parsley.examples.mail.impl.FolderImpl#getSubfolders <em>Subfolders</em>}</li>
+ * <li>{@link org.eclipse.emf.parsley.examples.mail.impl.FolderImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.parsley.examples.mail.impl.FolderImpl#getMails <em>Mails</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class FolderImpl extends FolderContentImpl implements Folder {
+ /**
+ * The cached value of the '{@link #getSubfolders() <em>Subfolders</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSubfolders()
+ * @generated
+ * @ordered
+ */
+ protected EList<Folder> subfolders;
+
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getMails() <em>Mails</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMails()
+ * @generated
+ * @ordered
+ */
+ protected EList<Mail> mails;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected FolderImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return MailPackage.Literals.FOLDER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Folder> getSubfolders() {
+ if (subfolders == null) {
+ subfolders = new EObjectContainmentEList<Folder>(Folder.class, this, MailPackage.FOLDER__SUBFOLDERS);
+ }
+ return subfolders;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, MailPackage.FOLDER__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Mail> getMails() {
+ if (mails == null) {
+ mails = new EObjectContainmentEList<Mail>(Mail.class, this, MailPackage.FOLDER__MAILS);
+ }
+ return mails;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case MailPackage.FOLDER__SUBFOLDERS:
+ return ((InternalEList<?>)getSubfolders()).basicRemove(otherEnd, msgs);
+ case MailPackage.FOLDER__MAILS:
+ return ((InternalEList<?>)getMails()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case MailPackage.FOLDER__SUBFOLDERS:
+ return getSubfolders();
+ case MailPackage.FOLDER__NAME:
+ return getName();
+ case MailPackage.FOLDER__MAILS:
+ return getMails();
+ }
+ 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 MailPackage.FOLDER__SUBFOLDERS:
+ getSubfolders().clear();
+ getSubfolders().addAll((Collection<? extends Folder>)newValue);
+ return;
+ case MailPackage.FOLDER__NAME:
+ setName((String)newValue);
+ return;
+ case MailPackage.FOLDER__MAILS:
+ getMails().clear();
+ getMails().addAll((Collection<? extends Mail>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case MailPackage.FOLDER__SUBFOLDERS:
+ getSubfolders().clear();
+ return;
+ case MailPackage.FOLDER__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case MailPackage.FOLDER__MAILS:
+ getMails().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case MailPackage.FOLDER__SUBFOLDERS:
+ return subfolders != null && !subfolders.isEmpty();
+ case MailPackage.FOLDER__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case MailPackage.FOLDER__MAILS:
+ return mails != null && !mails.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} //FolderImpl
diff --git a/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/MailContentImpl.java b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/MailContentImpl.java
new file mode 100644
index 000000000..156b856aa
--- /dev/null
+++ b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/MailContentImpl.java
@@ -0,0 +1,39 @@
+/**
+ */
+package org.eclipse.emf.parsley.examples.mail.impl;
+
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.parsley.examples.mail.MailContent;
+import org.eclipse.emf.parsley.examples.mail.MailPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Content</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class MailContentImpl extends FolderContentImpl implements MailContent {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected MailContentImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return MailPackage.Literals.MAIL_CONTENT;
+ }
+
+} //MailContentImpl
diff --git a/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/MailFactoryImpl.java b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/MailFactoryImpl.java
new file mode 100644
index 000000000..b2b752a79
--- /dev/null
+++ b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/MailFactoryImpl.java
@@ -0,0 +1,128 @@
+/**
+ */
+package org.eclipse.emf.parsley.examples.mail.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.parsley.examples.mail.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class MailFactoryImpl extends EFactoryImpl implements MailFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static MailFactory init() {
+ try {
+ MailFactory theMailFactory = (MailFactory)EPackage.Registry.INSTANCE.getEFactory("http:///org/eclipse/emf/parsley/examples/mail/mail.ecore/0.1.0");
+ if (theMailFactory != null) {
+ return theMailFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new MailFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MailFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case MailPackage.ACCOUNT: return createAccount();
+ case MailPackage.FOLDER: return createFolder();
+ case MailPackage.MAIL_CONTENT: return createMailContent();
+ case MailPackage.MAIL: return createMail();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Account createAccount() {
+ AccountImpl account = new AccountImpl();
+ return account;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Folder createFolder() {
+ FolderImpl folder = new FolderImpl();
+ return folder;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MailContent createMailContent() {
+ MailContentImpl mailContent = new MailContentImpl();
+ return mailContent;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Mail createMail() {
+ MailImpl mail = new MailImpl();
+ return mail;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MailPackage getMailPackage() {
+ return (MailPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static MailPackage getPackage() {
+ return MailPackage.eINSTANCE;
+ }
+
+} //MailFactoryImpl
diff --git a/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/MailImpl.java b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/MailImpl.java
new file mode 100644
index 000000000..9f8a4f545
--- /dev/null
+++ b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/MailImpl.java
@@ -0,0 +1,314 @@
+/**
+ */
+package org.eclipse.emf.parsley.examples.mail.impl;
+
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;
+import org.eclipse.emf.parsley.examples.mail.Mail;
+import org.eclipse.emf.parsley.examples.mail.MailPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Mail</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.parsley.examples.mail.impl.MailImpl#getFrom <em>From</em>}</li>
+ * <li>{@link org.eclipse.emf.parsley.examples.mail.impl.MailImpl#getRecipients <em>Recipients</em>}</li>
+ * <li>{@link org.eclipse.emf.parsley.examples.mail.impl.MailImpl#getMessage <em>Message</em>}</li>
+ * <li>{@link org.eclipse.emf.parsley.examples.mail.impl.MailImpl#getSubject <em>Subject</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class MailImpl extends EObjectImpl implements Mail {
+ /**
+ * The default value of the '{@link #getFrom() <em>From</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFrom()
+ * @generated
+ * @ordered
+ */
+ protected static final String FROM_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getFrom() <em>From</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFrom()
+ * @generated
+ * @ordered
+ */
+ protected String from = FROM_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getRecipients() <em>Recipients</em>}' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getRecipients()
+ * @generated
+ * @ordered
+ */
+ protected EList<String> recipients;
+
+ /**
+ * The default value of the '{@link #getMessage() <em>Message</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMessage()
+ * @generated
+ * @ordered
+ */
+ protected static final String MESSAGE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getMessage() <em>Message</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMessage()
+ * @generated
+ * @ordered
+ */
+ protected String message = MESSAGE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getSubject() <em>Subject</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSubject()
+ * @generated
+ * @ordered
+ */
+ protected static final String SUBJECT_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getSubject() <em>Subject</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSubject()
+ * @generated
+ * @ordered
+ */
+ protected String subject = SUBJECT_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected MailImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return MailPackage.Literals.MAIL;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getFrom() {
+ return from;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setFrom(String newFrom) {
+ String oldFrom = from;
+ from = newFrom;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, MailPackage.MAIL__FROM, oldFrom, from));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<String> getRecipients() {
+ if (recipients == null) {
+ recipients = new EDataTypeUniqueEList<String>(String.class, this, MailPackage.MAIL__RECIPIENTS);
+ }
+ return recipients;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getMessage() {
+ return message;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setMessage(String newMessage) {
+ String oldMessage = message;
+ message = newMessage;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, MailPackage.MAIL__MESSAGE, oldMessage, message));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getSubject() {
+ return subject;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSubject(String newSubject) {
+ String oldSubject = subject;
+ subject = newSubject;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, MailPackage.MAIL__SUBJECT, oldSubject, subject));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case MailPackage.MAIL__FROM:
+ return getFrom();
+ case MailPackage.MAIL__RECIPIENTS:
+ return getRecipients();
+ case MailPackage.MAIL__MESSAGE:
+ return getMessage();
+ case MailPackage.MAIL__SUBJECT:
+ return getSubject();
+ }
+ 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 MailPackage.MAIL__FROM:
+ setFrom((String)newValue);
+ return;
+ case MailPackage.MAIL__RECIPIENTS:
+ getRecipients().clear();
+ getRecipients().addAll((Collection<? extends String>)newValue);
+ return;
+ case MailPackage.MAIL__MESSAGE:
+ setMessage((String)newValue);
+ return;
+ case MailPackage.MAIL__SUBJECT:
+ setSubject((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case MailPackage.MAIL__FROM:
+ setFrom(FROM_EDEFAULT);
+ return;
+ case MailPackage.MAIL__RECIPIENTS:
+ getRecipients().clear();
+ return;
+ case MailPackage.MAIL__MESSAGE:
+ setMessage(MESSAGE_EDEFAULT);
+ return;
+ case MailPackage.MAIL__SUBJECT:
+ setSubject(SUBJECT_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case MailPackage.MAIL__FROM:
+ return FROM_EDEFAULT == null ? from != null : !FROM_EDEFAULT.equals(from);
+ case MailPackage.MAIL__RECIPIENTS:
+ return recipients != null && !recipients.isEmpty();
+ case MailPackage.MAIL__MESSAGE:
+ return MESSAGE_EDEFAULT == null ? message != null : !MESSAGE_EDEFAULT.equals(message);
+ case MailPackage.MAIL__SUBJECT:
+ return SUBJECT_EDEFAULT == null ? subject != null : !SUBJECT_EDEFAULT.equals(subject);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (from: ");
+ result.append(from);
+ result.append(", recipients: ");
+ result.append(recipients);
+ result.append(", message: ");
+ result.append(message);
+ result.append(", subject: ");
+ result.append(subject);
+ result.append(')');
+ return result.toString();
+ }
+
+} //MailImpl
diff --git a/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/MailPackageImpl.java b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/MailPackageImpl.java
new file mode 100644
index 000000000..0983ed075
--- /dev/null
+++ b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/impl/MailPackageImpl.java
@@ -0,0 +1,363 @@
+/**
+ */
+package org.eclipse.emf.parsley.examples.mail.impl;
+
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.emf.parsley.examples.mail.Account;
+import org.eclipse.emf.parsley.examples.mail.Folder;
+import org.eclipse.emf.parsley.examples.mail.FolderContent;
+import org.eclipse.emf.parsley.examples.mail.Mail;
+import org.eclipse.emf.parsley.examples.mail.MailContent;
+import org.eclipse.emf.parsley.examples.mail.MailFactory;
+import org.eclipse.emf.parsley.examples.mail.MailPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class MailPackageImpl extends EPackageImpl implements MailPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass accountEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass folderEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass folderContentEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass mailContentEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass mailEClass = 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.parsley.examples.mail.MailPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private MailPackageImpl() {
+ super(eNS_URI, MailFactory.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 MailPackage#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 MailPackage init() {
+ if (isInited) return (MailPackage)EPackage.Registry.INSTANCE.getEPackage(MailPackage.eNS_URI);
+
+ // Obtain or create and register package
+ MailPackageImpl theMailPackage = (MailPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof MailPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new MailPackageImpl());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theMailPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theMailPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theMailPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(MailPackage.eNS_URI, theMailPackage);
+ return theMailPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getAccount() {
+ return accountEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getAccount_Name() {
+ return (EAttribute)accountEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getAccount_Email() {
+ return (EAttribute)accountEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getAccount_Folders() {
+ return (EReference)accountEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getFolder() {
+ return folderEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getFolder_Subfolders() {
+ return (EReference)folderEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getFolder_Name() {
+ return (EAttribute)folderEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getFolder_Mails() {
+ return (EReference)folderEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getFolderContent() {
+ return folderContentEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getMailContent() {
+ return mailContentEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getMail() {
+ return mailEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getMail_From() {
+ return (EAttribute)mailEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getMail_Recipients() {
+ return (EAttribute)mailEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getMail_Message() {
+ return (EAttribute)mailEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getMail_Subject() {
+ return (EAttribute)mailEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MailFactory getMailFactory() {
+ return (MailFactory)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
+ accountEClass = createEClass(ACCOUNT);
+ createEAttribute(accountEClass, ACCOUNT__NAME);
+ createEAttribute(accountEClass, ACCOUNT__EMAIL);
+ createEReference(accountEClass, ACCOUNT__FOLDERS);
+
+ folderEClass = createEClass(FOLDER);
+ createEReference(folderEClass, FOLDER__SUBFOLDERS);
+ createEAttribute(folderEClass, FOLDER__NAME);
+ createEReference(folderEClass, FOLDER__MAILS);
+
+ folderContentEClass = createEClass(FOLDER_CONTENT);
+
+ mailContentEClass = createEClass(MAIL_CONTENT);
+
+ mailEClass = createEClass(MAIL);
+ createEAttribute(mailEClass, MAIL__FROM);
+ createEAttribute(mailEClass, MAIL__RECIPIENTS);
+ createEAttribute(mailEClass, MAIL__MESSAGE);
+ createEAttribute(mailEClass, MAIL__SUBJECT);
+ }
+
+ /**
+ * <!-- 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);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ folderEClass.getESuperTypes().add(this.getFolderContent());
+ mailContentEClass.getESuperTypes().add(this.getFolderContent());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(accountEClass, Account.class, "Account", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getAccount_Name(), ecorePackage.getEString(), "name", null, 0, 1, Account.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getAccount_Email(), ecorePackage.getEString(), "email", null, 0, 1, Account.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getAccount_Folders(), this.getFolder(), null, "folders", null, 0, -1, Account.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(folderEClass, Folder.class, "Folder", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getFolder_Subfolders(), this.getFolder(), null, "subfolders", null, 0, -1, Folder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getFolder_Name(), ecorePackage.getEString(), "name", null, 0, 1, Folder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getFolder_Mails(), this.getMail(), null, "mails", null, 0, -1, Folder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(folderContentEClass, FolderContent.class, "FolderContent", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(mailContentEClass, MailContent.class, "MailContent", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(mailEClass, Mail.class, "Mail", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getMail_From(), ecorePackage.getEString(), "from", null, 0, 1, Mail.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getMail_Recipients(), ecorePackage.getEString(), "recipients", null, 0, -1, Mail.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getMail_Message(), ecorePackage.getEString(), "message", null, 0, 1, Mail.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getMail_Subject(), ecorePackage.getEString(), "subject", null, 0, 1, Mail.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //MailPackageImpl
diff --git a/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/util/MailAdapterFactory.java b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/util/MailAdapterFactory.java
new file mode 100644
index 000000000..78126fe03
--- /dev/null
+++ b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/util/MailAdapterFactory.java
@@ -0,0 +1,192 @@
+/**
+ */
+package org.eclipse.emf.parsley.examples.mail.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.parsley.examples.mail.*;
+
+/**
+ * <!-- 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.parsley.examples.mail.MailPackage
+ * @generated
+ */
+public class MailAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static MailPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MailAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = MailPackage.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 MailSwitch<Adapter> modelSwitch =
+ new MailSwitch<Adapter>() {
+ @Override
+ public Adapter caseAccount(Account object) {
+ return createAccountAdapter();
+ }
+ @Override
+ public Adapter caseFolder(Folder object) {
+ return createFolderAdapter();
+ }
+ @Override
+ public Adapter caseFolderContent(FolderContent object) {
+ return createFolderContentAdapter();
+ }
+ @Override
+ public Adapter caseMailContent(MailContent object) {
+ return createMailContentAdapter();
+ }
+ @Override
+ public Adapter caseMail(Mail object) {
+ return createMailAdapter();
+ }
+ @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.parsley.examples.mail.Account <em>Account</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.parsley.examples.mail.Account
+ * @generated
+ */
+ public Adapter createAccountAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.parsley.examples.mail.Folder <em>Folder</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.parsley.examples.mail.Folder
+ * @generated
+ */
+ public Adapter createFolderAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.parsley.examples.mail.FolderContent <em>Folder Content</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.parsley.examples.mail.FolderContent
+ * @generated
+ */
+ public Adapter createFolderContentAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.parsley.examples.mail.MailContent <em>Content</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.parsley.examples.mail.MailContent
+ * @generated
+ */
+ public Adapter createMailContentAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.parsley.examples.mail.Mail <em>Mail</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.parsley.examples.mail.Mail
+ * @generated
+ */
+ public Adapter createMailAdapter() {
+ 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;
+ }
+
+} //MailAdapterFactory
diff --git a/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/util/MailSwitch.java b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/util/MailSwitch.java
new file mode 100644
index 000000000..01935785f
--- /dev/null
+++ b/examples/org.eclipse.emf.parsley.examples.mail.model/src/org/eclipse/emf/parsley/examples/mail/util/MailSwitch.java
@@ -0,0 +1,196 @@
+/**
+ */
+package org.eclipse.emf.parsley.examples.mail.util;
+
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.Switch;
+import org.eclipse.emf.parsley.examples.mail.*;
+
+/**
+ * <!-- 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.parsley.examples.mail.MailPackage
+ * @generated
+ */
+public class MailSwitch<T> extends Switch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static MailPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MailSwitch() {
+ if (modelPackage == null) {
+ modelPackage = MailPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case MailPackage.ACCOUNT: {
+ Account account = (Account)theEObject;
+ T result = caseAccount(account);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case MailPackage.FOLDER: {
+ Folder folder = (Folder)theEObject;
+ T result = caseFolder(folder);
+ if (result == null) result = caseFolderContent(folder);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case MailPackage.FOLDER_CONTENT: {
+ FolderContent folderContent = (FolderContent)theEObject;
+ T result = caseFolderContent(folderContent);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case MailPackage.MAIL_CONTENT: {
+ MailContent mailContent = (MailContent)theEObject;
+ T result = caseMailContent(mailContent);
+ if (result == null) result = caseFolderContent(mailContent);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case MailPackage.MAIL: {
+ Mail mail = (Mail)theEObject;
+ T result = caseMail(mail);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Account</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>Account</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAccount(Account object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Folder</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>Folder</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFolder(Folder object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Folder Content</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>Folder Content</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFolderContent(FolderContent object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Content</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>Content</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseMailContent(MailContent object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Mail</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>Mail</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseMail(Mail object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //MailSwitch

Back to the top