From 7693663e85bf22ae381526853648358bedb87a13 Mon Sep 17 00:00:00 2001
From: Martin Fluegge
Date: Sat, 5 Jun 2010 19:28:18 +0000
Subject: [308232] [Dawn] Develop collaborative support for GMF on CDO
https://bugs.eclipse.org/bugs/show_bug.cgi?id=308232
---
.../.classpath | 7 +
.../.cvsignore | 3 +
.../.project | 28 +
.../.settings/acore.gmfgen.prefs | 7 +
.../.settings/classdiagram.gmfgen.prefs | 7 +
.../.settings/org.eclipse.core.resources.prefs | 3 +
.../.settings/org.eclipse.jdt.core.prefs | 361 +++++++
.../.settings/org.eclipse.jdt.ui.prefs | 120 +++
.../org.eclipse.ltk.core.refactoring.prefs | 3 +
.../.settings/org.eclipse.mylyn.tasks.ui.prefs | 4 +
.../.settings/org.eclipse.mylyn.team.ui.prefs | 3 +
.../.settings/org.eclipse.pde.api.tools.prefs | 94 ++
.../.settings/org.eclipse.pde.prefs | 31 +
.../META-INF/CDO.MF | 1 +
.../META-INF/MANIFEST.MF | 16 +
.../about.html | 28 +
.../build.properties | 14 +
.../copyright.txt | 8 +
.../model/acore.ecore | 64 ++
.../model/acore.genmodel | 52 +
.../model/acore.gmfgen | 740 ++++++++++++++
.../model/acore.gmfgraph | 292 ++++++
.../model/acore.gmfmap | 240 +++++
.../model/acore.gmftool | 120 +++
.../model/acore.trace | 22 +
.../plugin.properties | 11 +
.../plugin.xml | 24 +
.../emf/cdo/dawn/examples/acore/AAttribute.java | 34 +
.../emf/cdo/dawn/examples/acore/ABasicClass.java | 104 ++
.../emf/cdo/dawn/examples/acore/AClass.java | 125 +++
.../emf/cdo/dawn/examples/acore/AClassChild.java | 154 +++
.../emf/cdo/dawn/examples/acore/ACoreRoot.java | 104 ++
.../emf/cdo/dawn/examples/acore/AInterface.java | 34 +
.../emf/cdo/dawn/examples/acore/AOperation.java | 57 ++
.../emf/cdo/dawn/examples/acore/AParameter.java | 95 ++
.../emf/cdo/dawn/examples/acore/AccessType.java | 293 ++++++
.../emf/cdo/dawn/examples/acore/AcoreFactory.java | 122 +++
.../emf/cdo/dawn/examples/acore/AcorePackage.java | 1061 ++++++++++++++++++++
.../dawn/examples/acore/impl/AAttributeImpl.java | 58 ++
.../dawn/examples/acore/impl/ABasicClassImpl.java | 123 +++
.../dawn/examples/acore/impl/AClassChildImpl.java | 158 +++
.../cdo/dawn/examples/acore/impl/AClassImpl.java | 124 +++
.../dawn/examples/acore/impl/ACoreRootImpl.java | 123 +++
.../dawn/examples/acore/impl/AInterfaceImpl.java | 58 ++
.../dawn/examples/acore/impl/AOperationImpl.java | 76 ++
.../dawn/examples/acore/impl/AParameterImpl.java | 116 +++
.../dawn/examples/acore/impl/AcoreFactoryImpl.java | 287 ++++++
.../dawn/examples/acore/impl/AcorePackageImpl.java | 635 ++++++++++++
.../examples/acore/util/AcoreAdapterFactory.java | 288 ++++++
.../cdo/dawn/examples/acore/util/AcoreSwitch.java | 319 ++++++
.../dawn/examples/acore/bundle/Activator.java | 66 ++
51 files changed, 6917 insertions(+)
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/.classpath
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/.cvsignore
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/.project
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/acore.gmfgen.prefs
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/classdiagram.gmfgen.prefs
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.core.resources.prefs
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.jdt.core.prefs
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.jdt.ui.prefs
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.ltk.core.refactoring.prefs
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.mylyn.tasks.ui.prefs
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.mylyn.team.ui.prefs
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.pde.api.tools.prefs
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.pde.prefs
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/META-INF/CDO.MF
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/META-INF/MANIFEST.MF
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/about.html
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/build.properties
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/copyright.txt
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.ecore
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.genmodel
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.gmfgen
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.gmfgraph
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.gmfmap
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.gmftool
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.trace
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/plugin.properties
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/plugin.xml
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AAttribute.java
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/ABasicClass.java
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AClass.java
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AClassChild.java
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/ACoreRoot.java
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AInterface.java
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AOperation.java
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AParameter.java
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AccessType.java
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AcoreFactory.java
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AcorePackage.java
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AAttributeImpl.java
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/ABasicClassImpl.java
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AClassChildImpl.java
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AClassImpl.java
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/ACoreRootImpl.java
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AInterfaceImpl.java
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AOperationImpl.java
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AParameterImpl.java
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AcoreFactoryImpl.java
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AcorePackageImpl.java
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/util/AcoreAdapterFactory.java
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/util/AcoreSwitch.java
create mode 100644 plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/internal/dawn/examples/acore/bundle/Activator.java
(limited to 'plugins/org.eclipse.emf.cdo.dawn.examples.acore')
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.classpath b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.classpath
new file mode 100644
index 0000000000..304e86186a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.classpath
@@ -0,0 +1,7 @@
+
+
June 5, 2007
+The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v10.html. +For purposes of the EPL, "Program" will mean the Content.
+ +If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at http://www.eclipse.org.
+ + + diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/build.properties b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/build.properties new file mode 100644 index 0000000000..cfbefc8de8 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/build.properties @@ -0,0 +1,14 @@ + +#+ * The following features are supported: + *
+ * If the meaning of the 'Operations' containment reference list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Operations' containment reference list. + * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getABasicClass_Operations() + * @model containment="true" + * @generated + */ + EList+ * If the meaning of the 'Attributes' containment reference list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Attributes' containment reference list. + * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getABasicClass_Attributes() + * @model containment="true" + * @generated + */ + EList+ * If the meaning of the 'Name' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getABasicClass_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + +} // ABasicClass diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AClass.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AClass.java new file mode 100644 index 0000000000..e8e8bfffae --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AClass.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany). + * 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: + * Martin Fluegge - initial API and implementation + * + */ +package org.eclipse.emf.cdo.dawn.examples.acore; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'AClass'. + * + * + *+ * The following features are supported: + *
+ * If the meaning of the 'Sub Classes' reference list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Sub Classes' reference list. + * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAClass_SubClasses() + * @model + * @generated + */ + EList+ * If the meaning of the 'Implemented Interfaces' reference list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Implemented Interfaces' reference list. + * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAClass_ImplementedInterfaces() + * @model + * @generated + */ + EList+ * If the meaning of the 'Associations' reference list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Associations' reference list. + * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAClass_Associations() + * @model + * @generated + */ + EList+ * If the meaning of the 'Compositions' reference list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Compositions' reference list. + * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAClass_Compositions() + * @model + * @generated + */ + EList+ * If the meaning of the 'Aggregations' reference list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Aggregations' reference list. + * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAClass_Aggregations() + * @model + * @generated + */ + EList+ * The following features are supported: + *
""
.
+ *
+ * + * If the meaning of the 'Name' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAClassChild_Name() + * @model default="" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.dawn.examples.acore.AClassChild#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Accessright' attribute. + * The default value is"public"
.
+ * The literals are from the enumeration {@link org.eclipse.emf.cdo.dawn.examples.acore.AccessType}.
+ *
+ * + * If the meaning of the 'Accessright' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Accessright' attribute. + * @see org.eclipse.emf.cdo.dawn.examples.acore.AccessType + * @see #isSetAccessright() + * @see #unsetAccessright() + * @see #setAccessright(AccessType) + * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAClassChild_Accessright() + * @model default="public" unique="false" unsettable="true" + * @generated + */ + AccessType getAccessright(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.dawn.examples.acore.AClassChild#getAccessright Accessright}' attribute. + * + * + * @param value the new value of the 'Accessright' attribute. + * @see org.eclipse.emf.cdo.dawn.examples.acore.AccessType + * @see #isSetAccessright() + * @see #unsetAccessright() + * @see #getAccessright() + * @generated + */ + void setAccessright(AccessType value); + + /** + * Unsets the value of the '{@link org.eclipse.emf.cdo.dawn.examples.acore.AClassChild#getAccessright Accessright}' attribute. + * + * + * @see #isSetAccessright() + * @see #getAccessright() + * @see #setAccessright(AccessType) + * @generated + */ + void unsetAccessright(); + + /** + * Returns whether the value of the '{@link org.eclipse.emf.cdo.dawn.examples.acore.AClassChild#getAccessright Accessright}' attribute is set. + * + * + * @return whether the value of the 'Accessright' attribute is set. + * @see #unsetAccessright() + * @see #getAccessright() + * @see #setAccessright(AccessType) + * @generated + */ + boolean isSetAccessright(); + + /** + * Returns the value of the 'Data Type' attribute. + * + *+ * If the meaning of the 'Data Type' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Data Type' attribute. + * @see #setDataType(String) + * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAClassChild_DataType() + * @model + * @generated + */ + String getDataType(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.dawn.examples.acore.AClassChild#getDataType Data Type}' attribute. + * + * + * @param value the new value of the 'Data Type' attribute. + * @see #getDataType() + * @generated + */ + void setDataType(String value); + +} // AClassChild diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/ACoreRoot.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/ACoreRoot.java new file mode 100644 index 0000000000..97ef616eb0 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/ACoreRoot.java @@ -0,0 +1,104 @@ +/** + * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany). + * 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: + * Martin Fluegge - initial API and implementation + * + */ +package org.eclipse.emf.cdo.dawn.examples.acore; + +import org.eclipse.emf.cdo.CDOObject; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'ACore Root'. + * + * + *+ * The following features are supported: + *
+ * If the meaning of the 'Title' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Title' attribute. + * @see #setTitle(String) + * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getACoreRoot_Title() + * @model + * @generated + */ + String getTitle(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.dawn.examples.acore.ACoreRoot#getTitle Title}' attribute. + * + * + * @param value the new value of the 'Title' attribute. + * @see #getTitle() + * @generated + */ + void setTitle(String value); + + /** + * Returns the value of the 'Classes' containment reference list. + * The list contents are of type {@link org.eclipse.emf.cdo.dawn.examples.acore.AClass}. + * + *+ * If the meaning of the 'Classes' containment reference list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Classes' containment reference list. + * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getACoreRoot_Classes() + * @model containment="true" + * @generated + */ + EList+ * If the meaning of the 'Interfaces' containment reference list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Interfaces' containment reference list. + * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getACoreRoot_Interfaces() + * @model containment="true" + * @generated + */ + EList+ * The following features are supported: + *
+ * If the meaning of the 'Parameters' containment reference list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Parameters' containment reference list. + * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAOperation_Parameters() + * @model containment="true" + * @generated + */ + EList+ * The following features are supported: + *
+ * If the meaning of the 'Name' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAParameter_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.dawn.examples.acore.AParameter#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Type' attribute. + * + *+ * If the meaning of the 'Type' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Type' attribute. + * @see #setType(String) + * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAParameter_Type() + * @model + * @generated + */ + String getType(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.dawn.examples.acore.AParameter#getType Type}' attribute. + * + * + * @param value the new value of the 'Type' attribute. + * @see #getType() + * @generated + */ + void setType(String value); + +} // AParameter diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AccessType.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AccessType.java new file mode 100644 index 0000000000..2befc78aed --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AccessType.java @@ -0,0 +1,293 @@ +/** + * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany). + * 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: + * Martin Fluegge - initial API and implementation + * + */ +package org.eclipse.emf.cdo.dawn.examples.acore; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Access Type', + * and utility methods for working with them. + * + * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAccessType() + * @model extendedMetaData="name='AccessType'" + * @generated + */ +public enum AccessType implements Enumerator +{ + /** + * The 'PUBLIC' literal object. + * + * + * @see #PUBLIC_VALUE + * @generated + * @ordered + */ + PUBLIC(0, "PUBLIC", "public"), + + /** + * The 'PRIVATE' literal object. + * + * + * @see #PRIVATE_VALUE + * @generated + * @ordered + */ + PRIVATE(1, "PRIVATE", "private"), + + /** + * The 'PROECTED' literal object. + * + * + * @see #PROECTED_VALUE + * @generated + * @ordered + */ + PROECTED(2, "PROECTED", "protected"), + + /** + * The 'PACKAGE' literal object. + * + * + * @see #PACKAGE_VALUE + * @generated + * @ordered + */ + PACKAGE(3, "PACKAGE", "package"); + + /** + * + * + * @generated + */ + public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n"; + + /** + * The 'PUBLIC' literal value. + * + *+ * If the meaning of 'PUBLIC' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #PUBLIC + * @model literal="public" + * @generated + * @ordered + */ + public static final int PUBLIC_VALUE = 0; + + /** + * The 'PRIVATE' literal value. + * + *+ * If the meaning of 'PRIVATE' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #PRIVATE + * @model literal="private" + * @generated + * @ordered + */ + public static final int PRIVATE_VALUE = 1; + + /** + * The 'PROECTED' literal value. + * + *+ * If the meaning of 'PROECTED' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #PROECTED + * @model literal="protected" + * @generated + * @ordered + */ + public static final int PROECTED_VALUE = 2; + + /** + * The 'PACKAGE' literal value. + * + *+ * If the meaning of 'PACKAGE' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #PACKAGE + * @model literal="package" + * @generated + * @ordered + */ + public static final int PACKAGE_VALUE = 3; + + /** + * An array of all the 'Access Type' enumerators. + * + * + * @generated + */ + private static final AccessType[] VALUES_ARRAY = + new AccessType[] + { + PUBLIC, + PRIVATE, + PROECTED, + PACKAGE, + }; + + /** + * A public read-only list of all the 'Access Type' enumerators. + * + * + * @generated + */ + public static final List+ *
+ * + * @generated + */ +public class AAttributeImpl extends AClassChildImpl implements AAttribute +{ + /** + * + * + * @generated + */ + public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n"; + + /** + * + * + * @generated + */ + protected AAttributeImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return AcorePackage.Literals.AATTRIBUTE; + } + +} //AAttributeImpl diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/ABasicClassImpl.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/ABasicClassImpl.java new file mode 100644 index 0000000000..f106982b2c --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/ABasicClassImpl.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany). + * 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: + * Martin Fluegge - initial API and implementation + * + */ +package org.eclipse.emf.cdo.dawn.examples.acore.impl; + +import org.eclipse.emf.cdo.dawn.examples.acore.AAttribute; +import org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass; +import org.eclipse.emf.cdo.dawn.examples.acore.AOperation; +import org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +/** + * + * An implementation of the model object 'ABasic Class'. + * + *+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ *
+ * + * @generated + */ +public class AInterfaceImpl extends ABasicClassImpl implements AInterface +{ + /** + * + * + * @generated + */ + public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n"; + + /** + * + * + * @generated + */ + protected AInterfaceImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return AcorePackage.Literals.AINTERFACE; + } + +} //AInterfaceImpl diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AOperationImpl.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AOperationImpl.java new file mode 100644 index 0000000000..02089f8490 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AOperationImpl.java @@ -0,0 +1,76 @@ +/** + * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany). + * 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: + * Martin Fluegge - initial API and implementation + * + */ +package org.eclipse.emf.cdo.dawn.examples.acore.impl; + +import org.eclipse.emf.cdo.dawn.examples.acore.AOperation; +import org.eclipse.emf.cdo.dawn.examples.acore.AParameter; +import org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'AOperation'. + * + *+ * The following features are implemented: + *
+ * The following features are implemented: + *
Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#eNS_URI + * @see #init() + * @generated + */ + private AcorePackageImpl() + { + super(eNS_URI, AcoreFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *
This method is used to initialize {@link AcorePackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ *
+ *
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static AcorePackage init()
+ {
+ if (isInited) return (AcorePackage)EPackage.Registry.INSTANCE.getEPackage(AcorePackage.eNS_URI);
+
+ // Obtain or create and register package
+ AcorePackageImpl theAcorePackage = (AcorePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof AcorePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new AcorePackageImpl());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theAcorePackage.createPackageContents();
+
+ // Initialize created meta-data
+ theAcorePackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theAcorePackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(AcorePackage.eNS_URI, theAcorePackage);
+ return theAcorePackage;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EClass getAClass()
+ {
+ return aClassEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EReference getAClass_SubClasses()
+ {
+ return (EReference)aClassEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EReference getAClass_ImplementedInterfaces()
+ {
+ return (EReference)aClassEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EReference getAClass_Associations()
+ {
+ return (EReference)aClassEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EReference getAClass_Compositions()
+ {
+ return (EReference)aClassEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EReference getAClass_Aggregations()
+ {
+ return (EReference)aClassEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EClass getAInterface()
+ {
+ return aInterfaceEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EClass getACoreRoot()
+ {
+ return aCoreRootEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EAttribute getACoreRoot_Title()
+ {
+ return (EAttribute)aCoreRootEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EReference getACoreRoot_Classes()
+ {
+ return (EReference)aCoreRootEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EReference getACoreRoot_Interfaces()
+ {
+ return (EReference)aCoreRootEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EClass getAAttribute()
+ {
+ return aAttributeEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EClass getAOperation()
+ {
+ return aOperationEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EReference getAOperation_Parameters()
+ {
+ return (EReference)aOperationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EClass getABasicClass()
+ {
+ return aBasicClassEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EReference getABasicClass_Operations()
+ {
+ return (EReference)aBasicClassEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EReference getABasicClass_Attributes()
+ {
+ return (EReference)aBasicClassEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EAttribute getABasicClass_Name()
+ {
+ return (EAttribute)aBasicClassEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EClass getAParameter()
+ {
+ return aParameterEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EAttribute getAParameter_Name()
+ {
+ return (EAttribute)aParameterEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EAttribute getAParameter_Type()
+ {
+ return (EAttribute)aParameterEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EClass getAClassChild()
+ {
+ return aClassChildEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EAttribute getAClassChild_Name()
+ {
+ return (EAttribute)aClassChildEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EAttribute getAClassChild_Accessright()
+ {
+ return (EAttribute)aClassChildEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EAttribute getAClassChild_DataType()
+ {
+ return (EAttribute)aClassChildEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EEnum getAccessType()
+ {
+ return accessTypeEEnum;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EDataType getAccessTypeObject()
+ {
+ return accessTypeObjectEDataType;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public AcoreFactory getAcoreFactory()
+ {
+ return (AcoreFactory)getEFactoryInstance();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ *
+ *
+ * @generated
+ */
+ public void createPackageContents()
+ {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ aClassEClass = createEClass(ACLASS);
+ createEReference(aClassEClass, ACLASS__SUB_CLASSES);
+ createEReference(aClassEClass, ACLASS__IMPLEMENTED_INTERFACES);
+ createEReference(aClassEClass, ACLASS__ASSOCIATIONS);
+ createEReference(aClassEClass, ACLASS__COMPOSITIONS);
+ createEReference(aClassEClass, ACLASS__AGGREGATIONS);
+
+ aInterfaceEClass = createEClass(AINTERFACE);
+
+ aCoreRootEClass = createEClass(ACORE_ROOT);
+ createEAttribute(aCoreRootEClass, ACORE_ROOT__TITLE);
+ createEReference(aCoreRootEClass, ACORE_ROOT__CLASSES);
+ createEReference(aCoreRootEClass, ACORE_ROOT__INTERFACES);
+
+ aAttributeEClass = createEClass(AATTRIBUTE);
+
+ aOperationEClass = createEClass(AOPERATION);
+ createEReference(aOperationEClass, AOPERATION__PARAMETERS);
+
+ aBasicClassEClass = createEClass(ABASIC_CLASS);
+ createEReference(aBasicClassEClass, ABASIC_CLASS__OPERATIONS);
+ createEReference(aBasicClassEClass, ABASIC_CLASS__ATTRIBUTES);
+ createEAttribute(aBasicClassEClass, ABASIC_CLASS__NAME);
+
+ aParameterEClass = createEClass(APARAMETER);
+ createEAttribute(aParameterEClass, APARAMETER__NAME);
+ createEAttribute(aParameterEClass, APARAMETER__TYPE);
+
+ aClassChildEClass = createEClass(ACLASS_CHILD);
+ createEAttribute(aClassChildEClass, ACLASS_CHILD__NAME);
+ createEAttribute(aClassChildEClass, ACLASS_CHILD__ACCESSRIGHT);
+ createEAttribute(aClassChildEClass, ACLASS_CHILD__DATA_TYPE);
+
+ // Create enums
+ accessTypeEEnum = createEEnum(ACCESS_TYPE);
+
+ // Create data types
+ accessTypeObjectEDataType = createEDataType(ACCESS_TYPE_OBJECT);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ *
+ *
+ * @generated
+ */
+ public void initializePackageContents()
+ {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ aClassEClass.getESuperTypes().add(this.getABasicClass());
+ aInterfaceEClass.getESuperTypes().add(this.getABasicClass());
+ aAttributeEClass.getESuperTypes().add(this.getAClassChild());
+ aOperationEClass.getESuperTypes().add(this.getAClassChild());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(aClassEClass, AClass.class, "AClass", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getAClass_SubClasses(), this.getAClass(), null, "subClasses", null, 0, -1, AClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getAClass_ImplementedInterfaces(), this.getAInterface(), null, "implementedInterfaces", null, 0, -1, AClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getAClass_Associations(), this.getAClass(), null, "associations", null, 0, -1, AClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getAClass_Compositions(), this.getAClass(), null, "compositions", null, 0, -1, AClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getAClass_Aggregations(), this.getAClass(), null, "aggregations", null, 0, -1, AClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(aInterfaceEClass, AInterface.class, "AInterface", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(aCoreRootEClass, ACoreRoot.class, "ACoreRoot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getACoreRoot_Title(), ecorePackage.getEString(), "title", null, 0, 1, ACoreRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getACoreRoot_Classes(), this.getAClass(), null, "classes", null, 0, -1, ACoreRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getACoreRoot_Interfaces(), this.getAInterface(), null, "interfaces", null, 0, -1, ACoreRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(aAttributeEClass, AAttribute.class, "AAttribute", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(aOperationEClass, AOperation.class, "AOperation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getAOperation_Parameters(), this.getAParameter(), null, "parameters", null, 0, -1, AOperation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(aBasicClassEClass, ABasicClass.class, "ABasicClass", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getABasicClass_Operations(), this.getAOperation(), null, "operations", null, 0, -1, ABasicClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getABasicClass_Attributes(), this.getAAttribute(), null, "attributes", null, 0, -1, ABasicClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getABasicClass_Name(), ecorePackage.getEString(), "name", null, 0, 1, ABasicClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(aParameterEClass, AParameter.class, "AParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getAParameter_Name(), ecorePackage.getEString(), "name", null, 0, 1, AParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getAParameter_Type(), ecorePackage.getEString(), "type", null, 0, 1, AParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(aClassChildEClass, AClassChild.class, "AClassChild", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getAClassChild_Name(), ecorePackage.getEString(), "name", "", 0, 1, AClassChild.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getAClassChild_Accessright(), this.getAccessType(), "accessright", "public", 0, 1, AClassChild.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getAClassChild_DataType(), ecorePackage.getEString(), "dataType", null, 0, 1, AClassChild.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Initialize enums and add enum literals
+ initEEnum(accessTypeEEnum, AccessType.class, "AccessType");
+ addEEnumLiteral(accessTypeEEnum, AccessType.PUBLIC);
+ addEEnumLiteral(accessTypeEEnum, AccessType.PRIVATE);
+ addEEnumLiteral(accessTypeEEnum, AccessType.PROECTED);
+ addEEnumLiteral(accessTypeEEnum, AccessType.PACKAGE);
+
+ // Initialize data types
+ initEDataType(accessTypeObjectEDataType, AccessType.class, "AccessTypeObject", IS_SERIALIZABLE, IS_GENERATED_INSTANCE_CLASS);
+
+ // Create resource
+ createResource(eNS_URI);
+
+ // Create annotations
+ // http:///org/eclipse/emf/ecore/util/ExtendedMetaData
+ createExtendedMetaDataAnnotations();
+ }
+
+ /**
+ * Initializes the annotations for http:///org/eclipse/emf/ecore/util/ExtendedMetaData.
+ *
+ *
+ * @generated
+ */
+ protected void createExtendedMetaDataAnnotations()
+ {
+ String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData";
+ addAnnotation
+ (accessTypeEEnum,
+ source,
+ new String[]
+ {
+ "name", "AccessType"
+ });
+ addAnnotation
+ (accessTypeObjectEDataType,
+ source,
+ new String[]
+ {
+ "name", "AccessType:Object",
+ "baseType", "AccessType"
+ });
+ }
+
+} //AcorePackageImpl
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/util/AcoreAdapterFactory.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/util/AcoreAdapterFactory.java
new file mode 100644
index 0000000000..4d51178bfe
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/util/AcoreAdapterFactory.java
@@ -0,0 +1,288 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.util;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.*;
+
+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;
+
+/**
+ *
+ * The Adapter Factory for the model.
+ * It provides an adapter createXXX
method for each class of the model.
+ *
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage
+ * @generated
+ */
+public class AcoreAdapterFactory extends AdapterFactoryImpl
+{
+ /**
+ *
+ *
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * The cached model package.
+ *
+ *
+ * @generated
+ */
+ protected static AcorePackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ *
+ *
+ * @generated
+ */
+ public AcoreAdapterFactory()
+ {
+ if (modelPackage == null)
+ {
+ modelPackage = AcorePackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ *
+ * This implementation returns true
if the object is either the model's package or is an instance object of the model.
+ *
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object)
+ {
+ if (object == modelPackage)
+ {
+ return true;
+ }
+ if (object instanceof EObject)
+ {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the createXXX
methods.
+ *
+ *
+ * @generated
+ */
+ protected AcoreSwitchtarget
.
+ *
+ *
+ * @param target the object to adapt.
+ * @return the adapter for the target
.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target)
+ {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.dawn.examples.acore.AClass AClass}'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AClass
+ * @generated
+ */
+ public Adapter createAClassAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.dawn.examples.acore.AInterface AInterface}'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AInterface
+ * @generated
+ */
+ public Adapter createAInterfaceAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.dawn.examples.acore.ACoreRoot ACore Root}'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.ACoreRoot
+ * @generated
+ */
+ public Adapter createACoreRootAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.dawn.examples.acore.AAttribute AAttribute}'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AAttribute
+ * @generated
+ */
+ public Adapter createAAttributeAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.dawn.examples.acore.AOperation AOperation}'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AOperation
+ * @generated
+ */
+ public Adapter createAOperationAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass ABasic Class}'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass
+ * @generated
+ */
+ public Adapter createABasicClassAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.dawn.examples.acore.AParameter AParameter}'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AParameter
+ * @generated
+ */
+ public Adapter createAParameterAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.dawn.examples.acore.AClassChild AClass Child}'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AClassChild
+ * @generated
+ */
+ public Adapter createAClassChildAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ *
+ * This default implementation returns null.
+ *
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter()
+ {
+ return null;
+ }
+
+} //AcoreAdapterFactory
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/util/AcoreSwitch.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/util/AcoreSwitch.java
new file mode 100644
index 0000000000..e263f403da
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/util/AcoreSwitch.java
@@ -0,0 +1,319 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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:
+ * Martin Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.util;
+
+import java.util.List;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.*;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ *
+ * The Switch for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the caseXXX
method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ *
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage
+ * @generated
+ */
+public class AcoreSwitchcaseXXX
for each class of the model until one returns a non null result; it yields that result.
+ *
+ *
+ * @return the first non-null result returned by a caseXXX
call.
+ * @generated
+ */
+ public T doSwitch(EObject theEObject)
+ {
+ return doSwitch(theEObject.eClass(), theEObject);
+ }
+
+ /**
+ * Calls caseXXX
for each class of the model until one returns a non null result; it yields that result.
+ *
+ *
+ * @return the first non-null result returned by a caseXXX
call.
+ * @generated
+ */
+ protected T doSwitch(EClass theEClass, EObject theEObject)
+ {
+ if (theEClass.eContainer() == modelPackage)
+ {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ }
+ else
+ {
+ ListcaseXXX
for each class of the model until one returns a non null result; it yields that result.
+ *
+ *
+ * @return the first non-null result returned by a caseXXX
call.
+ * @generated
+ */
+ protected T doSwitch(int classifierID, EObject theEObject)
+ {
+ switch (classifierID)
+ {
+ case AcorePackage.ACLASS:
+ {
+ AClass aClass = (AClass)theEObject;
+ T result = caseAClass(aClass);
+ if (result == null) result = caseABasicClass(aClass);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case AcorePackage.AINTERFACE:
+ {
+ AInterface aInterface = (AInterface)theEObject;
+ T result = caseAInterface(aInterface);
+ if (result == null) result = caseABasicClass(aInterface);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case AcorePackage.ACORE_ROOT:
+ {
+ ACoreRoot aCoreRoot = (ACoreRoot)theEObject;
+ T result = caseACoreRoot(aCoreRoot);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case AcorePackage.AATTRIBUTE:
+ {
+ AAttribute aAttribute = (AAttribute)theEObject;
+ T result = caseAAttribute(aAttribute);
+ if (result == null) result = caseAClassChild(aAttribute);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case AcorePackage.AOPERATION:
+ {
+ AOperation aOperation = (AOperation)theEObject;
+ T result = caseAOperation(aOperation);
+ if (result == null) result = caseAClassChild(aOperation);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case AcorePackage.ABASIC_CLASS:
+ {
+ ABasicClass aBasicClass = (ABasicClass)theEObject;
+ T result = caseABasicClass(aBasicClass);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case AcorePackage.APARAMETER:
+ {
+ AParameter aParameter = (AParameter)theEObject;
+ T result = caseAParameter(aParameter);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case AcorePackage.ACLASS_CHILD:
+ {
+ AClassChild aClassChild = (AClassChild)theEObject;
+ T result = caseAClassChild(aClassChild);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'AClass'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'AClass'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAClass(AClass object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'AInterface'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'AInterface'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAInterface(AInterface object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'ACore Root'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'ACore Root'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseACoreRoot(ACoreRoot object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'AAttribute'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'AAttribute'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAAttribute(AAttribute object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'AOperation'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'AOperation'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAOperation(AOperation object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'ABasic Class'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'ABasic Class'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseABasicClass(ABasicClass object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'AParameter'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'AParameter'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAParameter(AParameter object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'AClass Child'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'AClass Child'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAClassChild(AClassChild object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'EObject'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'EObject'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ public T defaultCase(EObject object)
+ {
+ return null;
+ }
+
+} //AcoreSwitch
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/internal/dawn/examples/acore/bundle/Activator.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/internal/dawn/examples/acore/bundle/Activator.java
new file mode 100644
index 0000000000..5d420525b6
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/internal/dawn/examples/acore/bundle/Activator.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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:
+ * Martin Fluegge - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.emf.cdo.internal.dawn.examples.acore.bundle;
+
+import org.eclipse.core.runtime.Plugin;
+
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends Plugin
+{
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.emf.cdo.dawn.reference.editor";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator()
+ {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception
+ {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception
+ {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault()
+ {
+ return plugin;
+ }
+
+}
--
cgit v1.2.1