Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Helming2015-10-09 06:55:15 +0000
committerJonas Helming2015-10-09 09:47:07 +0000
commit51236c1d101c390f286ecbcd46da649123b131bc (patch)
tree07f4ae25f69ac85d961bda9d7bf7e788a915fa3d
parent4d62aec40e24918d6b8436fa87d89f51a8a504c7 (diff)
downloadeclipse.platform.ui-51236c1d101c390f286ecbcd46da649123b131bc.tar.gz
eclipse.platform.ui-51236c1d101c390f286ecbcd46da649123b131bc.tar.xz
eclipse.platform.ui-51236c1d101c390f286ecbcd46da649123b131bc.zip
Bug 478400 - Add simple constraints to the application model
Made parent id and parent feature for String Fragment manditory Change-Id: I535b7333abce80bbdea6cc230db019e79856ea6d Signed-off-by: Jonas Helming <jhelming@eclipsesource.com>
-rw-r--r--bundles/org.eclipse.e4.ui.model.workbench/model/ModelFragment.ecore6
-rw-r--r--bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/fragment/MStringModelFragment.java4
-rw-r--r--bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/fragment/impl/FragmentPackageImpl.java4
3 files changed, 8 insertions, 6 deletions
diff --git a/bundles/org.eclipse.e4.ui.model.workbench/model/ModelFragment.ecore b/bundles/org.eclipse.e4.ui.model.workbench/model/ModelFragment.ecore
index 58e1de5b6c3..0f300bbd6ae 100644
--- a/bundles/org.eclipse.e4.ui.model.workbench/model/ModelFragment.ecore
+++ b/bundles/org.eclipse.e4.ui.model.workbench/model/ModelFragment.ecore
@@ -42,12 +42,14 @@
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;p>&#xD;&#xA;&lt;strong>Developers&lt;/strong>:&#xD;&#xA;Add more detailed documentation by editing this comment in &#xD;&#xA;/org.eclipse.e4.ui.model.workbench/model/ModelFragment.ecore. &#xD;&#xA;There is a GenModel/documentation node under each type and attribute.&#xD;&#xA;&lt;/p>&#xD;&#xA;@since 1.0"/>
</eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="featurename" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="featurename" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;p>&#xD;&#xA;&lt;strong>Developers&lt;/strong>:&#xD;&#xA;Add more detailed documentation by editing this comment in &#xD;&#xA;/org.eclipse.e4.ui.model.workbench/model/ModelFragment.ecore. &#xD;&#xA;There is a GenModel/documentation node under each type and attribute.&#xD;&#xA;&lt;/p>"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="parentElementId" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="parentElementId" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="&lt;p>&#xD;&#xA;&lt;strong>Developers&lt;/strong>:&#xD;&#xA;Add more detailed documentation by editing this comment in &#xD;&#xA;/org.eclipse.e4.ui.model.workbench/model/ModelFragment.ecore. &#xD;&#xA;There is a GenModel/documentation node under each type and attribute.&#xD;&#xA;&lt;/p>"/>
</eAnnotations>
diff --git a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/fragment/MStringModelFragment.java b/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/fragment/MStringModelFragment.java
index c332557cbbe..407e74c1052 100644
--- a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/fragment/MStringModelFragment.java
+++ b/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/fragment/MStringModelFragment.java
@@ -55,7 +55,7 @@ public interface MStringModelFragment extends MModelFragment {
* <!-- end-model-doc -->
* @return the value of the '<em>Featurename</em>' attribute.
* @see #setFeaturename(String)
- * @model
+ * @model required="true"
* @generated
*/
String getFeaturename();
@@ -96,7 +96,7 @@ public interface MStringModelFragment extends MModelFragment {
* <!-- end-model-doc -->
* @return the value of the '<em>Parent Element Id</em>' attribute.
* @see #setParentElementId(String)
- * @model
+ * @model required="true"
* @generated
*/
String getParentElementId();
diff --git a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/fragment/impl/FragmentPackageImpl.java b/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/fragment/impl/FragmentPackageImpl.java
index eb91c322905..6daacf5ff9c 100644
--- a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/fragment/impl/FragmentPackageImpl.java
+++ b/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/fragment/impl/FragmentPackageImpl.java
@@ -472,8 +472,8 @@ public class FragmentPackageImpl extends EPackageImpl {
addEParameter(op, theApplicationPackage.getApplication(), "application", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
initEClass(stringModelFragmentEClass, MStringModelFragment.class, "StringModelFragment", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEAttribute(getStringModelFragment_Featurename(), ecorePackage.getEString(), "featurename", null, 0, 1, MStringModelFragment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(getStringModelFragment_ParentElementId(), ecorePackage.getEString(), "parentElementId", null, 0, 1, MStringModelFragment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getStringModelFragment_Featurename(), ecorePackage.getEString(), "featurename", null, 1, 1, MStringModelFragment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getStringModelFragment_ParentElementId(), ecorePackage.getEString(), "parentElementId", null, 1, 1, MStringModelFragment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEAttribute(getStringModelFragment_PositionInList(), ecorePackage.getEString(), "positionInList", null, 0, 1, MStringModelFragment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
// Create resource

Back to the top