diff options
author | vlorenzo | 2012-05-10 11:58:48 +0000 |
---|---|---|
committer | vlorenzo | 2012-05-10 11:58:48 +0000 |
commit | 57a408792fa8d7b6c57ef12c78d49d44ccc432a9 (patch) | |
tree | 959aa8b1b90767c274aa493d6de48e9b094f60dd /incoming | |
parent | 4bc1f34ed81be0f51adf06e09909866f553a33a2 (diff) | |
download | org.eclipse.papyrus-57a408792fa8d7b6c57ef12c78d49d44ccc432a9.tar.gz org.eclipse.papyrus-57a408792fa8d7b6c57ef12c78d49d44ccc432a9.tar.xz org.eclipse.papyrus-57a408792fa8d7b6c57ef12c78d49d44ccc432a9.zip |
Initial import.
379107: [Table Editor] Papyrus should provide a new metamodel for its tabular editor
https://bugs.eclipse.org/bugs/show_bug.cgi?id=379107
Diffstat (limited to 'incoming')
17 files changed, 2505 insertions, 0 deletions
diff --git a/incoming/org.eclipse.papyrus.infra.table.metamodel/.classpath b/incoming/org.eclipse.papyrus.infra.table.metamodel/.classpath new file mode 100644 index 00000000000..45f024e850e --- /dev/null +++ b/incoming/org.eclipse.papyrus.infra.table.metamodel/.classpath @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/incoming/org.eclipse.papyrus.infra.table.metamodel/.project b/incoming/org.eclipse.papyrus.infra.table.metamodel/.project new file mode 100644 index 00000000000..74177ebf436 --- /dev/null +++ b/incoming/org.eclipse.papyrus.infra.table.metamodel/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.table.metamodel</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/incoming/org.eclipse.papyrus.infra.table.metamodel/META-INF/MANIFEST.MF b/incoming/org.eclipse.papyrus.infra.table.metamodel/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..e65e56ac7ce --- /dev/null +++ b/incoming/org.eclipse.papyrus.infra.table.metamodel/META-INF/MANIFEST.MF @@ -0,0 +1,19 @@ +Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.infra.table.metamodel;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.papyrus.infra.table.metamodel.papyrustable,
+ org.eclipse.papyrus.infra.table.metamodel.papyrustable.impl,
+ org.eclipse.papyrus.infra.table.metamodel.papyrustable.util
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.facet.widgets.celleditors;visibility:=reexport,
+ org.eclipse.emf.facet.custom.metamodel;visibility:=reexport,
+ org.eclipse.emf.facet.efacet.metamodel;visibility:=reexport,
+ org.eclipse.emf.facet.widgets.table.metamodel;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/incoming/org.eclipse.papyrus.infra.table.metamodel/build.properties b/incoming/org.eclipse.papyrus.infra.table.metamodel/build.properties new file mode 100644 index 00000000000..a4d1e1d62e2 --- /dev/null +++ b/incoming/org.eclipse.papyrus.infra.table.metamodel/build.properties @@ -0,0 +1,19 @@ +# Copyright (c) 2012 CEA LIST.
+#
+# 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:
+# Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
+#
+
+bin.includes = .,\
+ model/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+jars.compile.order = .
+source.. = src/
+output.. = bin/
diff --git a/incoming/org.eclipse.papyrus.infra.table.metamodel/model/papyrustable.ecore b/incoming/org.eclipse.papyrus.infra.table.metamodel/model/papyrustable.ecore new file mode 100644 index 00000000000..d34ba78010a --- /dev/null +++ b/incoming/org.eclipse.papyrus.infra.table.metamodel/model/papyrustable.ecore @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="papyrustable" nsURI="http://www.eclipse.org/Papyrus/PapyrusTable/0.9.0/papyrustable"
+ nsPrefix="org.eclipse.papyrus.infra.table.metamodel.papyrustable">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This package contains the model used to store the Papyrus Table."/>
+ </eAnnotations>
+ <eClassifiers xsi:type="ecore:EClass" name="PapyrusTable" eSuperTypes="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EModelElement">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This element represents the tables used in Papyrus."/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This field allows to store a name for the Papyrus Table."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This field allows to store the type of the Papyrus Table. It is used to know how 
to open it in the papyrus sasheditor."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="table" eType="ecore:EClass platform:/plugin/org.eclipse.emf.facet.widgets.table.metamodel/model/table-0.2.0.ecore#//Table">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This field reference the EMF-Facet table that we use for the papyrus Table.
We choose to reference it (and not to do an inheritance) in order to be sure
to respect their API."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="fillingMode" eType="#//FillingMode">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This attribute allows to store how the table should be filled."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="feature" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EStructuralFeature">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This field references the EStructuralFeature to listen when the table is in Feature Mode."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="queries" eType="ecore:EClass platform:/plugin/org.eclipse.emf.facet.efacet.metamodel/model/efacet-0.2.0.ecore#//extensible/Query">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This field references the queries used to fill table when the table is in queries mode."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="usingUser" ordered="false"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" changeable="false"
+ volatile="true" derived="true">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This attribute is true when fillingMode==User."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="usingFeature" ordered="false"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" changeable="false"
+ volatile="true" transient="true" derived="true">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This attribute is true when fillingMode==Feature."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="usingQueries" ordered="false"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" changeable="false"
+ volatile="true" derived="true">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This attribute is true when fillingMode==Queries."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EEnum" name="FillingMode">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This enumeration provides literals representing the ways to fill the table."/>
+ </eAnnotations>
+ <eLiterals name="User" literal="USER">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This user drops the elements to fill the table."/>
+ </eAnnotations>
+ </eLiterals>
+ <eLiterals name="Queries" value="1" literal="QUERIES">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="We use queries to fill the table."/>
+ </eAnnotations>
+ </eLiterals>
+ <eLiterals name="Feature" value="2" literal="FEATURE">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="We listen a feature of the context of the table to fill it."/>
+ </eAnnotations>
+ </eLiterals>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/incoming/org.eclipse.papyrus.infra.table.metamodel/model/papyrustable.genmodel b/incoming/org.eclipse.papyrus.infra.table.metamodel/model/papyrustable.genmodel new file mode 100644 index 00000000000..84ea31638e4 --- /dev/null +++ b/incoming/org.eclipse.papyrus.infra.table.metamodel/model/papyrustable.genmodel @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2011 CEA LIST.

 
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:
 Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation"
+ modelDirectory="/org.eclipse.papyrus.infra.table.metamodel/src" modelPluginID="org.eclipse.papyrus.infra.table.metamodel"
+ modelName="Papyrustable" nonNLSMarkers="true" importerID="org.eclipse.emf.importer.ecore"
+ complianceLevel="5.0" copyrightFields="false" usedGenPackages="platform:/plugin/org.eclipse.emf.facet.widgets.celleditors/model/celleditors.genmodel#//modelCellEditor platform:/plugin/org.eclipse.emf.facet.custom.metamodel/model/custom-0.2.0.genmodel#//custom platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore platform:/plugin/org.eclipse.emf.facet.efacet.metamodel/model/efacet-0.2.0.genmodel#//efacet platform:/plugin/org.eclipse.emf.facet.widgets.table.metamodel/model/tableConfiguration-0.2.0.genmodel#//tableconfiguration platform:/plugin/org.eclipse.emf.facet.widgets.table.metamodel/model/table-0.2.0.genmodel#//table">
+ <foreignModel>papyrustable.ecore</foreignModel>
+ <genPackages prefix="Papyrustable" basePackage="org.eclipse.papyrus.infra.table.metamodel"
+ disposableProviderFactory="true" ecorePackage="papyrustable.ecore#/">
+ <genEnums typeSafeEnumCompatible="false" ecoreEnum="papyrustable.ecore#//FillingMode">
+ <genEnumLiterals ecoreEnumLiteral="papyrustable.ecore#//FillingMode/User"/>
+ <genEnumLiterals ecoreEnumLiteral="papyrustable.ecore#//FillingMode/Queries"/>
+ <genEnumLiterals ecoreEnumLiteral="papyrustable.ecore#//FillingMode/Feature"/>
+ </genEnums>
+ <genClasses ecoreClass="papyrustable.ecore#//PapyrusTable">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute papyrustable.ecore#//PapyrusTable/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute papyrustable.ecore#//PapyrusTable/type"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference papyrustable.ecore#//PapyrusTable/table"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute papyrustable.ecore#//PapyrusTable/fillingMode"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference papyrustable.ecore#//PapyrusTable/feature"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference papyrustable.ecore#//PapyrusTable/queries"/>
+ <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute papyrustable.ecore#//PapyrusTable/usingUser"/>
+ <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute papyrustable.ecore#//PapyrusTable/usingFeature"/>
+ <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute papyrustable.ecore#//PapyrusTable/usingQueries"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/incoming/org.eclipse.papyrus.infra.table.metamodel/plugin.properties b/incoming/org.eclipse.papyrus.infra.table.metamodel/plugin.properties new file mode 100644 index 00000000000..4d7a0bc0a1a --- /dev/null +++ b/incoming/org.eclipse.papyrus.infra.table.metamodel/plugin.properties @@ -0,0 +1,13 @@ +# Copyright (c) 2012 CEA LIST.
+#
+# 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:
+# Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
+#
+
+pluginName = Papyrustableinstance2 Model
+providerName = www.example.org
diff --git a/incoming/org.eclipse.papyrus.infra.table.metamodel/plugin.xml b/incoming/org.eclipse.papyrus.infra.table.metamodel/plugin.xml new file mode 100644 index 00000000000..16232255bd4 --- /dev/null +++ b/incoming/org.eclipse.papyrus.infra.table.metamodel/plugin.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ Copyright (c) 2012 CEA LIST.
+
+ 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:
+ Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
+
+-->
+
+<plugin>
+ <extension
+ point="org.eclipse.emf.ecore.generated_package">
+ <package
+ class="org.eclipse.papyrus.infra.table.metamodel.papyrustable.impl.PapyrustablePackageImpl"
+ genModel="model/papyrustable.genmodel"
+ uri="http://www.eclipse.org/Papyrus/PapyrusTable/0.9.0/papyrustable">
+ </package>
+ </extension>
+
+
+
+</plugin>
diff --git a/incoming/org.eclipse.papyrus.infra.table.metamodel/src/org/eclipse/papyrus/infra/table/metamodel/papyrustable/FillingMode.java b/incoming/org.eclipse.papyrus.infra.table.metamodel/src/org/eclipse/papyrus/infra/table/metamodel/papyrustable/FillingMode.java new file mode 100644 index 00000000000..6db6498e3ab --- /dev/null +++ b/incoming/org.eclipse.papyrus.infra.table.metamodel/src/org/eclipse/papyrus/infra/table/metamodel/papyrustable/FillingMode.java @@ -0,0 +1,245 @@ +/**
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * 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:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.metamodel.papyrustable;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Filling Mode</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This enumeration provides literals representing the ways to fill the table.
+ * <!-- end-model-doc -->
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrustablePackage#getFillingMode()
+ * @model
+ * @generated
+ */
+public enum FillingMode implements Enumerator {
+ /**
+ * The '<em><b>User</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #USER_VALUE
+ * @generated
+ * @ordered
+ */
+ USER(0, "User", "USER"), //$NON-NLS-1$ //$NON-NLS-2$
+
+ /**
+ * The '<em><b>Queries</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #QUERIES_VALUE
+ * @generated
+ * @ordered
+ */
+ QUERIES(1, "Queries", "QUERIES"), //$NON-NLS-1$ //$NON-NLS-2$
+
+ /**
+ * The '<em><b>Feature</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #FEATURE_VALUE
+ * @generated
+ * @ordered
+ */
+ FEATURE(2, "Feature", "FEATURE"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ /**
+ * The '<em><b>User</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This user drops the elements to fill the table.
+ * <!-- end-model-doc -->
+ * @see #USER
+ * @model name="User" literal="USER"
+ * @generated
+ * @ordered
+ */
+ public static final int USER_VALUE = 0;
+
+ /**
+ * The '<em><b>Queries</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * We use queries to fill the table.
+ * <!-- end-model-doc -->
+ * @see #QUERIES
+ * @model name="Queries" literal="QUERIES"
+ * @generated
+ * @ordered
+ */
+ public static final int QUERIES_VALUE = 1;
+
+ /**
+ * The '<em><b>Feature</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * We listen a feature of the context of the table to fill it.
+ * <!-- end-model-doc -->
+ * @see #FEATURE
+ * @model name="Feature" literal="FEATURE"
+ * @generated
+ * @ordered
+ */
+ public static final int FEATURE_VALUE = 2;
+
+ /**
+ * An array of all the '<em><b>Filling Mode</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final FillingMode[] VALUES_ARRAY =
+ new FillingMode[] {
+ USER,
+ QUERIES,
+ FEATURE,
+ };
+
+ /**
+ * A public read-only list of all the '<em><b>Filling Mode</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<FillingMode> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>Filling Mode</b></em>' literal with the specified literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static FillingMode get(String literal) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ FillingMode result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Filling Mode</b></em>' literal with the specified name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static FillingMode getByName(String name) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ FillingMode result = VALUES_ARRAY[i];
+ if (result.getName().equals(name)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Filling Mode</b></em>' literal with the specified integer value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static FillingMode get(int value) {
+ switch (value) {
+ case USER_VALUE: return USER;
+ case QUERIES_VALUE: return QUERIES;
+ case FEATURE_VALUE: return FEATURE;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final int value;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String name;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String literal;
+
+ /**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private FillingMode(int value, String name, String literal) {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLiteral() {
+ return literal;
+ }
+
+ /**
+ * Returns the literal value of the enumerator, which is its string representation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ return literal;
+ }
+
+} //FillingMode
diff --git a/incoming/org.eclipse.papyrus.infra.table.metamodel/src/org/eclipse/papyrus/infra/table/metamodel/papyrustable/PapyrusTable.java b/incoming/org.eclipse.papyrus.infra.table.metamodel/src/org/eclipse/papyrus/infra/table/metamodel/papyrustable/PapyrusTable.java new file mode 100644 index 00000000000..e8ebd603850 --- /dev/null +++ b/incoming/org.eclipse.papyrus.infra.table.metamodel/src/org/eclipse/papyrus/infra/table/metamodel/papyrustable/PapyrusTable.java @@ -0,0 +1,249 @@ +/**
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * 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:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.metamodel.papyrustable;
+
+import org.eclipse.emf.ecore.EModelElement;
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.extensible.Query;
+
+import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.Table;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Papyrus Table</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * This element represents the tables used in Papyrus.
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#getType <em>Type</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#getTable <em>Table</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#getFillingMode <em>Filling Mode</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#getFeature <em>Feature</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#getQueries <em>Queries</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#isUsingUser <em>Using User</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#isUsingFeature <em>Using Feature</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#isUsingQueries <em>Using Queries</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrustablePackage#getPapyrusTable()
+ * @model
+ * @generated
+ */
+public interface PapyrusTable extends EModelElement {
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This field allows to store a name for the Papyrus Table.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrustablePackage#getPapyrusTable_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#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>Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This field allows to store the type of the Papyrus Table. It is used to know how
+ * to open it in the papyrus sasheditor.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Type</em>' attribute.
+ * @see #setType(String)
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrustablePackage#getPapyrusTable_Type()
+ * @model
+ * @generated
+ */
+ String getType();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#getType <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Type</em>' attribute.
+ * @see #getType()
+ * @generated
+ */
+ void setType(String value);
+
+ /**
+ * Returns the value of the '<em><b>Table</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This field reference the EMF-Facet table that we use for the papyrus Table.
+ * We choose to reference it (and not to do an inheritance) in order to be sure
+ * to respect their API.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Table</em>' reference.
+ * @see #setTable(Table)
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrustablePackage#getPapyrusTable_Table()
+ * @model
+ * @generated
+ */
+ Table getTable();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#getTable <em>Table</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Table</em>' reference.
+ * @see #getTable()
+ * @generated
+ */
+ void setTable(Table value);
+
+ /**
+ * Returns the value of the '<em><b>Filling Mode</b></em>' attribute.
+ * The literals are from the enumeration {@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.FillingMode}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This attribute allows to store how the table should be filled.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Filling Mode</em>' attribute.
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.FillingMode
+ * @see #setFillingMode(FillingMode)
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrustablePackage#getPapyrusTable_FillingMode()
+ * @model
+ * @generated
+ */
+ FillingMode getFillingMode();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#getFillingMode <em>Filling Mode</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Filling Mode</em>' attribute.
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.FillingMode
+ * @see #getFillingMode()
+ * @generated
+ */
+ void setFillingMode(FillingMode value);
+
+ /**
+ * Returns the value of the '<em><b>Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This field references the EStructuralFeature to listen when the table is in Feature Mode.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Feature</em>' reference.
+ * @see #setFeature(EStructuralFeature)
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrustablePackage#getPapyrusTable_Feature()
+ * @model
+ * @generated
+ */
+ EStructuralFeature getFeature();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#getFeature <em>Feature</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Feature</em>' reference.
+ * @see #getFeature()
+ * @generated
+ */
+ void setFeature(EStructuralFeature value);
+
+ /**
+ * Returns the value of the '<em><b>Queries</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This field references the queries used to fill table when the table is in queries mode.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Queries</em>' reference.
+ * @see #setQueries(Query)
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrustablePackage#getPapyrusTable_Queries()
+ * @model
+ * @generated
+ */
+ Query getQueries();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#getQueries <em>Queries</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Queries</em>' reference.
+ * @see #getQueries()
+ * @generated
+ */
+ void setQueries(Query value);
+
+ /**
+ * Returns the value of the '<em><b>Using User</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This attribute is true when fillingMode==User.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Using User</em>' attribute.
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrustablePackage#getPapyrusTable_UsingUser()
+ * @model changeable="false" volatile="true" derived="true" ordered="false"
+ * @generated
+ */
+ boolean isUsingUser();
+
+ /**
+ * Returns the value of the '<em><b>Using Feature</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This attribute is true when fillingMode==Feature.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Using Feature</em>' attribute.
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrustablePackage#getPapyrusTable_UsingFeature()
+ * @model transient="true" changeable="false" volatile="true" derived="true" ordered="false"
+ * @generated
+ */
+ boolean isUsingFeature();
+
+ /**
+ * Returns the value of the '<em><b>Using Queries</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This attribute is true when fillingMode==Queries.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Using Queries</em>' attribute.
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrustablePackage#getPapyrusTable_UsingQueries()
+ * @model changeable="false" volatile="true" derived="true" ordered="false"
+ * @generated
+ */
+ boolean isUsingQueries();
+
+} // PapyrusTable
diff --git a/incoming/org.eclipse.papyrus.infra.table.metamodel/src/org/eclipse/papyrus/infra/table/metamodel/papyrustable/PapyrustableFactory.java b/incoming/org.eclipse.papyrus.infra.table.metamodel/src/org/eclipse/papyrus/infra/table/metamodel/papyrustable/PapyrustableFactory.java new file mode 100644 index 00000000000..37e79b70880 --- /dev/null +++ b/incoming/org.eclipse.papyrus.infra.table.metamodel/src/org/eclipse/papyrus/infra/table/metamodel/papyrustable/PapyrustableFactory.java @@ -0,0 +1,52 @@ +/**
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * 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:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.metamodel.papyrustable;
+
+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.papyrus.infra.table.metamodel.papyrustable.PapyrustablePackage
+ * @generated
+ */
+public interface PapyrustableFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ PapyrustableFactory eINSTANCE = org.eclipse.papyrus.infra.table.metamodel.papyrustable.impl.PapyrustableFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Papyrus Table</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Papyrus Table</em>'.
+ * @generated
+ */
+ PapyrusTable createPapyrusTable();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ PapyrustablePackage getPapyrustablePackage();
+
+} //PapyrustableFactory
diff --git a/incoming/org.eclipse.papyrus.infra.table.metamodel/src/org/eclipse/papyrus/infra/table/metamodel/papyrustable/PapyrustablePackage.java b/incoming/org.eclipse.papyrus.infra.table.metamodel/src/org/eclipse/papyrus/infra/table/metamodel/papyrustable/PapyrustablePackage.java new file mode 100644 index 00000000000..598190ffd5e --- /dev/null +++ b/incoming/org.eclipse.papyrus.infra.table.metamodel/src/org/eclipse/papyrus/infra/table/metamodel/papyrustable/PapyrustablePackage.java @@ -0,0 +1,428 @@ +/**
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * 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:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.metamodel.papyrustable;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EcorePackage;
+
+/**
+ * <!-- 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 -->
+ * <!-- begin-model-doc -->
+ * This package contains the model used to store the Papyrus Table.
+ * <!-- end-model-doc -->
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrustableFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface PapyrustablePackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "papyrustable"; //$NON-NLS-1$
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/Papyrus/PapyrusTable/0.9.0/papyrustable"; //$NON-NLS-1$
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "org.eclipse.papyrus.infra.table.metamodel.papyrustable"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ PapyrustablePackage eINSTANCE = org.eclipse.papyrus.infra.table.metamodel.papyrustable.impl.PapyrustablePackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.impl.PapyrusTableImpl <em>Papyrus Table</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.impl.PapyrusTableImpl
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.impl.PapyrustablePackageImpl#getPapyrusTable()
+ * @generated
+ */
+ int PAPYRUS_TABLE = 0;
+
+ /**
+ * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__EANNOTATIONS = EcorePackage.EMODEL_ELEMENT__EANNOTATIONS;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__NAME = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__TYPE = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Table</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__TABLE = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Filling Mode</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__FILLING_MODE = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__FEATURE = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 4;
+
+ /**
+ * The feature id for the '<em><b>Queries</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__QUERIES = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 5;
+
+ /**
+ * The feature id for the '<em><b>Using User</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__USING_USER = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 6;
+
+ /**
+ * The feature id for the '<em><b>Using Feature</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__USING_FEATURE = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 7;
+
+ /**
+ * The feature id for the '<em><b>Using Queries</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__USING_QUERIES = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 8;
+
+ /**
+ * The number of structural features of the '<em>Papyrus Table</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE_FEATURE_COUNT = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 9;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.FillingMode <em>Filling Mode</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.FillingMode
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.impl.PapyrustablePackageImpl#getFillingMode()
+ * @generated
+ */
+ int FILLING_MODE = 1;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable <em>Papyrus Table</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Papyrus Table</em>'.
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable
+ * @generated
+ */
+ EClass getPapyrusTable();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#getName()
+ * @see #getPapyrusTable()
+ * @generated
+ */
+ EAttribute getPapyrusTable_Name();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#getType <em>Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Type</em>'.
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#getType()
+ * @see #getPapyrusTable()
+ * @generated
+ */
+ EAttribute getPapyrusTable_Type();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#getTable <em>Table</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Table</em>'.
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#getTable()
+ * @see #getPapyrusTable()
+ * @generated
+ */
+ EReference getPapyrusTable_Table();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#getFillingMode <em>Filling Mode</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Filling Mode</em>'.
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#getFillingMode()
+ * @see #getPapyrusTable()
+ * @generated
+ */
+ EAttribute getPapyrusTable_FillingMode();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#getFeature <em>Feature</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Feature</em>'.
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#getFeature()
+ * @see #getPapyrusTable()
+ * @generated
+ */
+ EReference getPapyrusTable_Feature();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#getQueries <em>Queries</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Queries</em>'.
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#getQueries()
+ * @see #getPapyrusTable()
+ * @generated
+ */
+ EReference getPapyrusTable_Queries();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#isUsingUser <em>Using User</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Using User</em>'.
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#isUsingUser()
+ * @see #getPapyrusTable()
+ * @generated
+ */
+ EAttribute getPapyrusTable_UsingUser();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#isUsingFeature <em>Using Feature</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Using Feature</em>'.
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#isUsingFeature()
+ * @see #getPapyrusTable()
+ * @generated
+ */
+ EAttribute getPapyrusTable_UsingFeature();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#isUsingQueries <em>Using Queries</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Using Queries</em>'.
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable#isUsingQueries()
+ * @see #getPapyrusTable()
+ * @generated
+ */
+ EAttribute getPapyrusTable_UsingQueries();
+
+ /**
+ * Returns the meta object for enum '{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.FillingMode <em>Filling Mode</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>Filling Mode</em>'.
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.FillingMode
+ * @generated
+ */
+ EEnum getFillingMode();
+
+ /**
+ * 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
+ */
+ PapyrustableFactory getPapyrustableFactory();
+
+ /**
+ * <!-- 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.papyrus.infra.table.metamodel.papyrustable.impl.PapyrusTableImpl <em>Papyrus Table</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.impl.PapyrusTableImpl
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.impl.PapyrustablePackageImpl#getPapyrusTable()
+ * @generated
+ */
+ EClass PAPYRUS_TABLE = eINSTANCE.getPapyrusTable();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PAPYRUS_TABLE__NAME = eINSTANCE.getPapyrusTable_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Type</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PAPYRUS_TABLE__TYPE = eINSTANCE.getPapyrusTable_Type();
+
+ /**
+ * The meta object literal for the '<em><b>Table</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_TABLE__TABLE = eINSTANCE.getPapyrusTable_Table();
+
+ /**
+ * The meta object literal for the '<em><b>Filling Mode</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PAPYRUS_TABLE__FILLING_MODE = eINSTANCE.getPapyrusTable_FillingMode();
+
+ /**
+ * The meta object literal for the '<em><b>Feature</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_TABLE__FEATURE = eINSTANCE.getPapyrusTable_Feature();
+
+ /**
+ * The meta object literal for the '<em><b>Queries</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_TABLE__QUERIES = eINSTANCE.getPapyrusTable_Queries();
+
+ /**
+ * The meta object literal for the '<em><b>Using User</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PAPYRUS_TABLE__USING_USER = eINSTANCE.getPapyrusTable_UsingUser();
+
+ /**
+ * The meta object literal for the '<em><b>Using Feature</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PAPYRUS_TABLE__USING_FEATURE = eINSTANCE.getPapyrusTable_UsingFeature();
+
+ /**
+ * The meta object literal for the '<em><b>Using Queries</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PAPYRUS_TABLE__USING_QUERIES = eINSTANCE.getPapyrusTable_UsingQueries();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.FillingMode <em>Filling Mode</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.FillingMode
+ * @see org.eclipse.papyrus.infra.table.metamodel.papyrustable.impl.PapyrustablePackageImpl#getFillingMode()
+ * @generated
+ */
+ EEnum FILLING_MODE = eINSTANCE.getFillingMode();
+
+ }
+
+} //PapyrustablePackage
diff --git a/incoming/org.eclipse.papyrus.infra.table.metamodel/src/org/eclipse/papyrus/infra/table/metamodel/papyrustable/impl/PapyrusTableImpl.java b/incoming/org.eclipse.papyrus.infra.table.metamodel/src/org/eclipse/papyrus/infra/table/metamodel/papyrustable/impl/PapyrusTableImpl.java new file mode 100644 index 00000000000..010d85f141f --- /dev/null +++ b/incoming/org.eclipse.papyrus.infra.table.metamodel/src/org/eclipse/papyrus/infra/table/metamodel/papyrustable/impl/PapyrusTableImpl.java @@ -0,0 +1,546 @@ +/**
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * 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:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.metamodel.papyrustable.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.EModelElementImpl;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.extensible.Query;
+
+import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.Table;
+
+import org.eclipse.papyrus.infra.table.metamodel.papyrustable.FillingMode;
+import org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable;
+import org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrustablePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Papyrus Table</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.impl.PapyrusTableImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.impl.PapyrusTableImpl#getType <em>Type</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.impl.PapyrusTableImpl#getTable <em>Table</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.impl.PapyrusTableImpl#getFillingMode <em>Filling Mode</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.impl.PapyrusTableImpl#getFeature <em>Feature</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.impl.PapyrusTableImpl#getQueries <em>Queries</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.impl.PapyrusTableImpl#isUsingUser <em>Using User</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.impl.PapyrusTableImpl#isUsingFeature <em>Using Feature</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.metamodel.papyrustable.impl.PapyrusTableImpl#isUsingQueries <em>Using Queries</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PapyrusTableImpl extends EModelElementImpl implements PapyrusTable {
+ /**
+ * 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 #getType() <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getType()
+ * @generated
+ * @ordered
+ */
+ protected static final String TYPE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getType() <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getType()
+ * @generated
+ * @ordered
+ */
+ protected String type = TYPE_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getTable() <em>Table</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTable()
+ * @generated
+ * @ordered
+ */
+ protected Table table;
+
+ /**
+ * The default value of the '{@link #getFillingMode() <em>Filling Mode</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFillingMode()
+ * @generated
+ * @ordered
+ */
+ protected static final FillingMode FILLING_MODE_EDEFAULT = FillingMode.USER;
+
+ /**
+ * The cached value of the '{@link #getFillingMode() <em>Filling Mode</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFillingMode()
+ * @generated
+ * @ordered
+ */
+ protected FillingMode fillingMode = FILLING_MODE_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getFeature() <em>Feature</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFeature()
+ * @generated
+ * @ordered
+ */
+ protected EStructuralFeature feature;
+
+ /**
+ * The cached value of the '{@link #getQueries() <em>Queries</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getQueries()
+ * @generated
+ * @ordered
+ */
+ protected Query queries;
+
+ /**
+ * The default value of the '{@link #isUsingUser() <em>Using User</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isUsingUser()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean USING_USER_EDEFAULT = false;
+
+ /**
+ * The default value of the '{@link #isUsingFeature() <em>Using Feature</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isUsingFeature()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean USING_FEATURE_EDEFAULT = false;
+
+ /**
+ * The default value of the '{@link #isUsingQueries() <em>Using Queries</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isUsingQueries()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean USING_QUERIES_EDEFAULT = false;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrusTableImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PapyrustablePackage.Literals.PAPYRUS_TABLE;
+ }
+
+ /**
+ * <!-- 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, PapyrustablePackage.PAPYRUS_TABLE__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setType(String newType) {
+ String oldType = type;
+ type = newType;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PapyrustablePackage.PAPYRUS_TABLE__TYPE, oldType, type));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Table getTable() {
+ if (table != null && table.eIsProxy()) {
+ InternalEObject oldTable = (InternalEObject)table;
+ table = (Table)eResolveProxy(oldTable);
+ if (table != oldTable) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, PapyrustablePackage.PAPYRUS_TABLE__TABLE, oldTable, table));
+ }
+ }
+ return table;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Table basicGetTable() {
+ return table;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTable(Table newTable) {
+ Table oldTable = table;
+ table = newTable;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PapyrustablePackage.PAPYRUS_TABLE__TABLE, oldTable, table));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FillingMode getFillingMode() {
+ return fillingMode;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setFillingMode(FillingMode newFillingMode) {
+ FillingMode oldFillingMode = fillingMode;
+ fillingMode = newFillingMode == null ? FILLING_MODE_EDEFAULT : newFillingMode;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PapyrustablePackage.PAPYRUS_TABLE__FILLING_MODE, oldFillingMode, fillingMode));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EStructuralFeature getFeature() {
+ if (feature != null && feature.eIsProxy()) {
+ InternalEObject oldFeature = (InternalEObject)feature;
+ feature = (EStructuralFeature)eResolveProxy(oldFeature);
+ if (feature != oldFeature) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, PapyrustablePackage.PAPYRUS_TABLE__FEATURE, oldFeature, feature));
+ }
+ }
+ return feature;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EStructuralFeature basicGetFeature() {
+ return feature;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setFeature(EStructuralFeature newFeature) {
+ EStructuralFeature oldFeature = feature;
+ feature = newFeature;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PapyrustablePackage.PAPYRUS_TABLE__FEATURE, oldFeature, feature));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Query getQueries() {
+ if (queries != null && queries.eIsProxy()) {
+ InternalEObject oldQueries = (InternalEObject)queries;
+ queries = (Query)eResolveProxy(oldQueries);
+ if (queries != oldQueries) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, PapyrustablePackage.PAPYRUS_TABLE__QUERIES, oldQueries, queries));
+ }
+ }
+ return queries;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Query basicGetQueries() {
+ return queries;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setQueries(Query newQueries) {
+ Query oldQueries = queries;
+ queries = newQueries;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PapyrustablePackage.PAPYRUS_TABLE__QUERIES, oldQueries, queries));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isUsingUser() {
+ // TODO: implement this method to return the 'Using User' attribute
+ // Ensure that you remove @generated or mark it @generated NOT
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isUsingFeature() {
+ // TODO: implement this method to return the 'Using Feature' attribute
+ // Ensure that you remove @generated or mark it @generated NOT
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isUsingQueries() {
+ // TODO: implement this method to return the 'Using Queries' attribute
+ // Ensure that you remove @generated or mark it @generated NOT
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PapyrustablePackage.PAPYRUS_TABLE__NAME:
+ return getName();
+ case PapyrustablePackage.PAPYRUS_TABLE__TYPE:
+ return getType();
+ case PapyrustablePackage.PAPYRUS_TABLE__TABLE:
+ if (resolve) return getTable();
+ return basicGetTable();
+ case PapyrustablePackage.PAPYRUS_TABLE__FILLING_MODE:
+ return getFillingMode();
+ case PapyrustablePackage.PAPYRUS_TABLE__FEATURE:
+ if (resolve) return getFeature();
+ return basicGetFeature();
+ case PapyrustablePackage.PAPYRUS_TABLE__QUERIES:
+ if (resolve) return getQueries();
+ return basicGetQueries();
+ case PapyrustablePackage.PAPYRUS_TABLE__USING_USER:
+ return isUsingUser();
+ case PapyrustablePackage.PAPYRUS_TABLE__USING_FEATURE:
+ return isUsingFeature();
+ case PapyrustablePackage.PAPYRUS_TABLE__USING_QUERIES:
+ return isUsingQueries();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PapyrustablePackage.PAPYRUS_TABLE__NAME:
+ setName((String)newValue);
+ return;
+ case PapyrustablePackage.PAPYRUS_TABLE__TYPE:
+ setType((String)newValue);
+ return;
+ case PapyrustablePackage.PAPYRUS_TABLE__TABLE:
+ setTable((Table)newValue);
+ return;
+ case PapyrustablePackage.PAPYRUS_TABLE__FILLING_MODE:
+ setFillingMode((FillingMode)newValue);
+ return;
+ case PapyrustablePackage.PAPYRUS_TABLE__FEATURE:
+ setFeature((EStructuralFeature)newValue);
+ return;
+ case PapyrustablePackage.PAPYRUS_TABLE__QUERIES:
+ setQueries((Query)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PapyrustablePackage.PAPYRUS_TABLE__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case PapyrustablePackage.PAPYRUS_TABLE__TYPE:
+ setType(TYPE_EDEFAULT);
+ return;
+ case PapyrustablePackage.PAPYRUS_TABLE__TABLE:
+ setTable((Table)null);
+ return;
+ case PapyrustablePackage.PAPYRUS_TABLE__FILLING_MODE:
+ setFillingMode(FILLING_MODE_EDEFAULT);
+ return;
+ case PapyrustablePackage.PAPYRUS_TABLE__FEATURE:
+ setFeature((EStructuralFeature)null);
+ return;
+ case PapyrustablePackage.PAPYRUS_TABLE__QUERIES:
+ setQueries((Query)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PapyrustablePackage.PAPYRUS_TABLE__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case PapyrustablePackage.PAPYRUS_TABLE__TYPE:
+ return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type);
+ case PapyrustablePackage.PAPYRUS_TABLE__TABLE:
+ return table != null;
+ case PapyrustablePackage.PAPYRUS_TABLE__FILLING_MODE:
+ return fillingMode != FILLING_MODE_EDEFAULT;
+ case PapyrustablePackage.PAPYRUS_TABLE__FEATURE:
+ return feature != null;
+ case PapyrustablePackage.PAPYRUS_TABLE__QUERIES:
+ return queries != null;
+ case PapyrustablePackage.PAPYRUS_TABLE__USING_USER:
+ return isUsingUser() != USING_USER_EDEFAULT;
+ case PapyrustablePackage.PAPYRUS_TABLE__USING_FEATURE:
+ return isUsingFeature() != USING_FEATURE_EDEFAULT;
+ case PapyrustablePackage.PAPYRUS_TABLE__USING_QUERIES:
+ return isUsingQueries() != USING_QUERIES_EDEFAULT;
+ }
+ 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: "); //$NON-NLS-1$
+ result.append(name);
+ result.append(", type: "); //$NON-NLS-1$
+ result.append(type);
+ result.append(", fillingMode: "); //$NON-NLS-1$
+ result.append(fillingMode);
+ result.append(')');
+ return result.toString();
+ }
+
+} //PapyrusTableImpl
diff --git a/incoming/org.eclipse.papyrus.infra.table.metamodel/src/org/eclipse/papyrus/infra/table/metamodel/papyrustable/impl/PapyrustableFactoryImpl.java b/incoming/org.eclipse.papyrus.infra.table.metamodel/src/org/eclipse/papyrus/infra/table/metamodel/papyrustable/impl/PapyrustableFactoryImpl.java new file mode 100644 index 00000000000..9f269bc8fb5 --- /dev/null +++ b/incoming/org.eclipse.papyrus.infra.table.metamodel/src/org/eclipse/papyrus/infra/table/metamodel/papyrustable/impl/PapyrustableFactoryImpl.java @@ -0,0 +1,156 @@ +/**
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * 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:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.metamodel.papyrustable.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.papyrus.infra.table.metamodel.papyrustable.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PapyrustableFactoryImpl extends EFactoryImpl implements PapyrustableFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static PapyrustableFactory init() {
+ try {
+ PapyrustableFactory thePapyrustableFactory = (PapyrustableFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/Papyrus/PapyrusTable/0.9.0/papyrustable"); //$NON-NLS-1$
+ if (thePapyrustableFactory != null) {
+ return thePapyrustableFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new PapyrustableFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrustableFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case PapyrustablePackage.PAPYRUS_TABLE: return createPapyrusTable();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue) {
+ switch (eDataType.getClassifierID()) {
+ case PapyrustablePackage.FILLING_MODE:
+ return createFillingModeFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue) {
+ switch (eDataType.getClassifierID()) {
+ case PapyrustablePackage.FILLING_MODE:
+ return convertFillingModeToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusTable createPapyrusTable() {
+ PapyrusTableImpl papyrusTable = new PapyrusTableImpl();
+ return papyrusTable;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FillingMode createFillingModeFromString(EDataType eDataType, String initialValue) {
+ FillingMode result = FillingMode.get(initialValue);
+ if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertFillingModeToString(EDataType eDataType, Object instanceValue) {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrustablePackage getPapyrustablePackage() {
+ return (PapyrustablePackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static PapyrustablePackage getPackage() {
+ return PapyrustablePackage.eINSTANCE;
+ }
+
+} //PapyrustableFactoryImpl
diff --git a/incoming/org.eclipse.papyrus.infra.table.metamodel/src/org/eclipse/papyrus/infra/table/metamodel/papyrustable/impl/PapyrustablePackageImpl.java b/incoming/org.eclipse.papyrus.infra.table.metamodel/src/org/eclipse/papyrus/infra/table/metamodel/papyrustable/impl/PapyrustablePackageImpl.java new file mode 100644 index 00000000000..8c0b5ec77bd --- /dev/null +++ b/incoming/org.eclipse.papyrus.infra.table.metamodel/src/org/eclipse/papyrus/infra/table/metamodel/papyrustable/impl/PapyrustablePackageImpl.java @@ -0,0 +1,317 @@ +/**
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * 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:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.metamodel.papyrustable.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EcorePackage;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.extensible.ExtensiblePackage;
+
+import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.TablePackage;
+
+import org.eclipse.papyrus.infra.table.metamodel.papyrustable.FillingMode;
+import org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable;
+import org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrustableFactory;
+import org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrustablePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PapyrustablePackageImpl extends EPackageImpl implements PapyrustablePackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass papyrusTableEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EEnum fillingModeEEnum = 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.papyrus.infra.table.metamodel.papyrustable.PapyrustablePackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private PapyrustablePackageImpl() {
+ super(eNS_URI, PapyrustableFactory.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 PapyrustablePackage#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 PapyrustablePackage init() {
+ if (isInited) return (PapyrustablePackage)EPackage.Registry.INSTANCE.getEPackage(PapyrustablePackage.eNS_URI);
+
+ // Obtain or create and register package
+ PapyrustablePackageImpl thePapyrustablePackage = (PapyrustablePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof PapyrustablePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new PapyrustablePackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ TablePackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ thePapyrustablePackage.createPackageContents();
+
+ // Initialize created meta-data
+ thePapyrustablePackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ thePapyrustablePackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(PapyrustablePackage.eNS_URI, thePapyrustablePackage);
+ return thePapyrustablePackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPapyrusTable() {
+ return papyrusTableEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPapyrusTable_Name() {
+ return (EAttribute)papyrusTableEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPapyrusTable_Type() {
+ return (EAttribute)papyrusTableEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusTable_Table() {
+ return (EReference)papyrusTableEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPapyrusTable_FillingMode() {
+ return (EAttribute)papyrusTableEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusTable_Feature() {
+ return (EReference)papyrusTableEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusTable_Queries() {
+ return (EReference)papyrusTableEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPapyrusTable_UsingUser() {
+ return (EAttribute)papyrusTableEClass.getEStructuralFeatures().get(6);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPapyrusTable_UsingFeature() {
+ return (EAttribute)papyrusTableEClass.getEStructuralFeatures().get(7);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPapyrusTable_UsingQueries() {
+ return (EAttribute)papyrusTableEClass.getEStructuralFeatures().get(8);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EEnum getFillingMode() {
+ return fillingModeEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrustableFactory getPapyrustableFactory() {
+ return (PapyrustableFactory)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
+ papyrusTableEClass = createEClass(PAPYRUS_TABLE);
+ createEAttribute(papyrusTableEClass, PAPYRUS_TABLE__NAME);
+ createEAttribute(papyrusTableEClass, PAPYRUS_TABLE__TYPE);
+ createEReference(papyrusTableEClass, PAPYRUS_TABLE__TABLE);
+ createEAttribute(papyrusTableEClass, PAPYRUS_TABLE__FILLING_MODE);
+ createEReference(papyrusTableEClass, PAPYRUS_TABLE__FEATURE);
+ createEReference(papyrusTableEClass, PAPYRUS_TABLE__QUERIES);
+ createEAttribute(papyrusTableEClass, PAPYRUS_TABLE__USING_USER);
+ createEAttribute(papyrusTableEClass, PAPYRUS_TABLE__USING_FEATURE);
+ createEAttribute(papyrusTableEClass, PAPYRUS_TABLE__USING_QUERIES);
+
+ // Create enums
+ fillingModeEEnum = createEEnum(FILLING_MODE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
+ TablePackage theTablePackage = (TablePackage)EPackage.Registry.INSTANCE.getEPackage(TablePackage.eNS_URI);
+ ExtensiblePackage theExtensiblePackage = (ExtensiblePackage)EPackage.Registry.INSTANCE.getEPackage(ExtensiblePackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ papyrusTableEClass.getESuperTypes().add(theEcorePackage.getEModelElement());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(papyrusTableEClass, PapyrusTable.class, "PapyrusTable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getPapyrusTable_Name(), ecorePackage.getEString(), "name", null, 0, 1, PapyrusTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getPapyrusTable_Type(), ecorePackage.getEString(), "type", null, 0, 1, PapyrusTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getPapyrusTable_Table(), theTablePackage.getTable(), null, "table", null, 0, 1, PapyrusTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getPapyrusTable_FillingMode(), this.getFillingMode(), "fillingMode", null, 0, 1, PapyrusTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getPapyrusTable_Feature(), theEcorePackage.getEStructuralFeature(), null, "feature", null, 0, 1, PapyrusTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getPapyrusTable_Queries(), theExtensiblePackage.getQuery(), null, "queries", null, 0, 1, PapyrusTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getPapyrusTable_UsingUser(), ecorePackage.getEBoolean(), "usingUser", null, 0, 1, PapyrusTable.class, !IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getPapyrusTable_UsingFeature(), ecorePackage.getEBoolean(), "usingFeature", null, 0, 1, PapyrusTable.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getPapyrusTable_UsingQueries(), ecorePackage.getEBoolean(), "usingQueries", null, 0, 1, PapyrusTable.class, !IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$
+
+ // Initialize enums and add enum literals
+ initEEnum(fillingModeEEnum, FillingMode.class, "FillingMode"); //$NON-NLS-1$
+ addEEnumLiteral(fillingModeEEnum, FillingMode.USER);
+ addEEnumLiteral(fillingModeEEnum, FillingMode.QUERIES);
+ addEEnumLiteral(fillingModeEEnum, FillingMode.FEATURE);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //PapyrustablePackageImpl
diff --git a/incoming/org.eclipse.papyrus.infra.table.metamodel/src/org/eclipse/papyrus/infra/table/metamodel/papyrustable/util/PapyrustableAdapterFactory.java b/incoming/org.eclipse.papyrus.infra.table.metamodel/src/org/eclipse/papyrus/infra/table/metamodel/papyrustable/util/PapyrustableAdapterFactory.java new file mode 100644 index 00000000000..30fe21b29a2 --- /dev/null +++ b/incoming/org.eclipse.papyrus.infra.table.metamodel/src/org/eclipse/papyrus/infra/table/metamodel/papyrustable/util/PapyrustableAdapterFactory.java @@ -0,0 +1,149 @@ +/**
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * 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:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.metamodel.papyrustable.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.EModelElement;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.papyrus.infra.table.metamodel.papyrustable.*;
+
+/**
+ * <!-- 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.papyrus.infra.table.metamodel.papyrustable.PapyrustablePackage
+ * @generated
+ */
+public class PapyrustableAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static PapyrustablePackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrustableAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = PapyrustablePackage.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 PapyrustableSwitch<Adapter> modelSwitch =
+ new PapyrustableSwitch<Adapter>() {
+ @Override
+ public Adapter casePapyrusTable(PapyrusTable object) {
+ return createPapyrusTableAdapter();
+ }
+ @Override
+ public Adapter caseEModelElement(EModelElement object) {
+ return createEModelElementAdapter();
+ }
+ @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.papyrus.infra.table.metamodel.papyrustable.PapyrusTable <em>Papyrus Table</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.papyrus.infra.table.metamodel.papyrustable.PapyrusTable
+ * @generated
+ */
+ public Adapter createPapyrusTableAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.EModelElement <em>EModel Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.ecore.EModelElement
+ * @generated
+ */
+ public Adapter createEModelElementAdapter() {
+ 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;
+ }
+
+} //PapyrustableAdapterFactory
diff --git a/incoming/org.eclipse.papyrus.infra.table.metamodel/src/org/eclipse/papyrus/infra/table/metamodel/papyrustable/util/PapyrustableSwitch.java b/incoming/org.eclipse.papyrus.infra.table.metamodel/src/org/eclipse/papyrus/infra/table/metamodel/papyrustable/util/PapyrustableSwitch.java new file mode 100644 index 00000000000..991b9642d00 --- /dev/null +++ b/incoming/org.eclipse.papyrus.infra.table.metamodel/src/org/eclipse/papyrus/infra/table/metamodel/papyrustable/util/PapyrustableSwitch.java @@ -0,0 +1,137 @@ +/**
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * 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:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.metamodel.papyrustable.util;
+
+import org.eclipse.emf.ecore.EModelElement;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.Switch;
+
+import org.eclipse.papyrus.infra.table.metamodel.papyrustable.*;
+
+/**
+ * <!-- 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.papyrus.infra.table.metamodel.papyrustable.PapyrustablePackage
+ * @generated
+ */
+public class PapyrustableSwitch<T> extends Switch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static PapyrustablePackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrustableSwitch() {
+ if (modelPackage == null) {
+ modelPackage = PapyrustablePackage.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 PapyrustablePackage.PAPYRUS_TABLE: {
+ PapyrusTable papyrusTable = (PapyrusTable)theEObject;
+ T result = casePapyrusTable(papyrusTable);
+ if (result == null) result = caseEModelElement(papyrusTable);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Papyrus Table</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>Papyrus Table</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePapyrusTable(PapyrusTable object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EModel Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EModel Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEModelElement(EModelElement 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;
+ }
+
+} //PapyrustableSwitch
|