Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 155901 Details for
Bug 290605
[evaluator] Inadequate support for large integers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
AST/CST change for Big numbers
Bug290605.patch (text/plain), 152.83 KB, created by
Ed Willink
on 2010-01-12 14:36:01 EST
(
hide
)
Description:
AST/CST change for Big numbers
Filename:
MIME Type:
Creator:
Ed Willink
Created:
2010-01-12 14:36:01 EST
Size:
152.83 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ocl >Index: model/OCL.ecore >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/model/OCL.ecore,v >retrieving revision 1.9 >diff -u -r1.9 OCL.ecore >--- model/OCL.ecore 6 Dec 2009 18:10:38 -0000 1.9 >+++ model/OCL.ecore 12 Jan 2010 19:21:34 -0000 >@@ -675,6 +675,7 @@ > </eParameters> > </eOperations> > </eClassifiers> >+ <eClassifiers xsi:type="ecore:EDataType" name="Number" instanceClassName="java.lang.Number"/> > <eClassifiers xsi:type="ecore:EClass" name="ExpressionInOCL" abstract="true" interface="true" > eSuperTypes="#//utilities/Visitable"> > <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> >@@ -1119,7 +1120,7 @@ > </eGenericType> > </eParameters> > </eOperations> >- <eStructuralFeatures xsi:type="ecore:EAttribute" name="integerSymbol" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/> >+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="integerSymbol" eType="#//utilities/Number"/> > <eGenericSuperTypes eClassifier="#//expressions/NumericLiteralExp"> > <eTypeArguments eTypeParameter="#//expressions/IntegerLiteralExp/C"/> > </eGenericSuperTypes> >@@ -1151,7 +1152,7 @@ > </eGenericType> > </eParameters> > </eOperations> >- <eStructuralFeatures xsi:type="ecore:EAttribute" name="integerSymbol" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/> >+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="integerSymbol" eType="#//utilities/Number"/> > <eStructuralFeatures xsi:type="ecore:EAttribute" name="unlimited" lowerBound="1" > eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" > changeable="false" volatile="true" transient="true" derived="true"/> >@@ -1703,7 +1704,7 @@ > </eGenericType> > </eParameters> > </eOperations> >- <eStructuralFeatures xsi:type="ecore:EAttribute" name="realSymbol" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDoubleObject"/> >+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="realSymbol" eType="#//utilities/Number"/> > <eGenericSuperTypes eClassifier="#//expressions/NumericLiteralExp"> > <eTypeArguments eTypeParameter="#//expressions/RealLiteralExp/C"/> > </eGenericSuperTypes> >Index: model/OCL.genmodel >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/model/OCL.genmodel,v >retrieving revision 1.10 >diff -u -r1.10 OCL.genmodel >--- model/OCL.genmodel 6 Dec 2009 18:10:38 -0000 1.10 >+++ model/OCL.genmodel 12 Jan 2010 19:21:36 -0000 >@@ -134,6 +134,7 @@ > <nestedGenPackages xsi:type="genmodel:GenPackage" prefix="Utilities" basePackage="org.eclipse.ocl" > disposableProviderFactory="true" multipleEditorPages="false" contentTypeIdentifier="org.eclipse.ocl.ast" > fileExtensions="oclxmi" ecorePackage="OCL.ecore#//utilities"> >+ <genDataTypes xsi:type="genmodel:GenDataType" ecoreDataType="OCL.ecore#//utilities/Number"/> > <genClasses xsi:type="genmodel:GenClass" ecoreClass="OCL.ecore#//utilities/ASTNode"> > <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute OCL.ecore#//utilities/ASTNode/startPosition"/> > <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute OCL.ecore#//utilities/ASTNode/endPosition"/> >Index: model/OCL.uml >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/model/OCL.uml,v >retrieving revision 1.9 >diff -u -r1.9 OCL.uml >--- model/OCL.uml 6 Dec 2009 18:10:56 -0000 1.9 >+++ model/OCL.uml 12 Jan 2010 19:21:40 -0000 >@@ -713,8 +713,7 @@ > </ownedParameter> > </ownedTemplateSignature> > <generalization xmi:id="_unvVyNppEdu-d8Dv4wLx9Q" general="_unvVy9ppEdu-d8Dv4wLx9Q"/> >- <ownedAttribute xmi:id="_unvVydppEdu-d8Dv4wLx9Q" name="integerSymbol" visibility="public" isOrdered="true"> >- <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml#EIntegerObject"/> >+ <ownedAttribute xmi:id="_unvVydppEdu-d8Dv4wLx9Q" name="integerSymbol" visibility="public" type="_rw67cP9tEd67_agdSFnrQQ" isOrdered="true"> > <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_unvVytppEdu-d8Dv4wLx9Q"/> > </ownedAttribute> > <nestedClassifier xmi:type="uml:Class" xmi:id="_unvVy9ppEdu-d8Dv4wLx9Q" name="NumericLiteralExp_C"> >@@ -749,8 +748,7 @@ > </ownedParameter> > </ownedTemplateSignature> > <generalization xmi:id="_unvV2tppEdu-d8Dv4wLx9Q" general="_unvV3tppEdu-d8Dv4wLx9Q"/> >- <ownedAttribute xmi:id="_unvV29ppEdu-d8Dv4wLx9Q" name="integerSymbol" visibility="public" isOrdered="true"> >- <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml#EIntegerObject"/> >+ <ownedAttribute xmi:id="_unvV29ppEdu-d8Dv4wLx9Q" name="integerSymbol" visibility="public" type="_rw67cP9tEd67_agdSFnrQQ" isOrdered="true"> > <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_unvV3NppEdu-d8Dv4wLx9Q"/> > </ownedAttribute> > <ownedAttribute xmi:id="_unvV3dppEdu-d8Dv4wLx9Q" name="unlimited" visibility="public" isOrdered="true" isReadOnly="true" isDerived="true"> >@@ -1182,8 +1180,7 @@ > </ownedParameter> > </ownedTemplateSignature> > <generalization xmi:id="_un1aYNppEdu-d8Dv4wLx9Q" general="_un1aY9ppEdu-d8Dv4wLx9Q"/> >- <ownedAttribute xmi:id="_un1aYdppEdu-d8Dv4wLx9Q" name="realSymbol" visibility="public" isOrdered="true"> >- <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml#EDoubleObject"/> >+ <ownedAttribute xmi:id="_un1aYdppEdu-d8Dv4wLx9Q" name="realSymbol" visibility="public" type="_rw67cP9tEd67_agdSFnrQQ" isOrdered="true"> > <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_un1aYtppEdu-d8Dv4wLx9Q"/> > </ownedAttribute> > <nestedClassifier xmi:type="uml:Class" xmi:id="_un1aY9ppEdu-d8Dv4wLx9Q" name="NumericLiteralExp_C"> >@@ -1913,6 +1910,7 @@ > <packagedElement xmi:type="uml:Association" xmi:id="_H0w1YNLnEd6hmvYFRJXZTA" memberEnd="_ykFGANLmEd6hmvYFRJXZTA _RPJFINLnEd6hmvYFRJXZTA"> > <ownedEnd xmi:id="_RPJFINLnEd6hmvYFRJXZTA" type="_unvU2NppEdu-d8Dv4wLx9Q" association="_H0w1YNLnEd6hmvYFRJXZTA"/> > </packagedElement> >+ <packagedElement xmi:type="uml:PrimitiveType" xmi:id="_rw67cP9tEd67_agdSFnrQQ" name="Number"/> > </packagedElement> > <profileApplication xmi:id="_un1az9ppEdu-d8Dv4wLx9Q"> > <eAnnotations xmi:id="_un1a0NppEdu-d8Dv4wLx9Q" source="http://www.eclipse.org/uml2/2.0.0/UML"> >@@ -2302,4 +2300,5 @@ > <Ecore:EParameter xmi:id="_SCfO4N1nEduZ74nG8yJaxg" base_Parameter="_FcnTgN1nEduZ74nG8yJaxg"/> > <Ecore_1:EClass xmi:id="_1lMzkNXZEd6ci-srLwOkAQ" base_Class="_-PCtwNLlEd6hmvYFRJXZTA"/> > <Ecore:EReference xmi:id="_82aXYNXZEd6ci-srLwOkAQ" base_Property="_ykFGANLmEd6hmvYFRJXZTA"/> >+ <Ecore:EDataType xmi:id="_t-sakP9tEd67_agdSFnrQQ" instanceClassName="java.lang.Number" base_PrimitiveType="_rw67cP9tEd67_agdSFnrQQ"/> > </xmi:XMI> >Index: model/OCLCST.ecore >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/model/OCLCST.ecore,v >retrieving revision 1.15 >diff -u -r1.15 OCLCST.ecore >--- model/OCLCST.ecore 27 Dec 2009 15:49:52 -0000 1.15 >+++ model/OCLCST.ecore 12 Jan 2010 19:21:40 -0000 >@@ -240,13 +240,14 @@ > <eStructuralFeatures xsi:type="ecore:EAttribute" name="symbol" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> > </eClassifiers> > <eClassifiers xsi:type="ecore:EClass" name="IntegerLiteralExpCS" eSuperTypes="#//cst/PrimitiveLiteralExpCS"> >- <eStructuralFeatures xsi:type="ecore:EAttribute" name="integerSymbol" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/> >+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="integerSymbol" eType="#//cst/Number"/> > </eClassifiers> >+ <eClassifiers xsi:type="ecore:EDataType" name="Number" instanceClassName="java.lang.Number"/> > <eClassifiers xsi:type="ecore:EClass" name="UnlimitedNaturalLiteralExpCS" eSuperTypes="#//cst/PrimitiveLiteralExpCS"> >- <eStructuralFeatures xsi:type="ecore:EAttribute" name="integerSymbol" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/> >+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="integerSymbol" eType="#//cst/Number"/> > </eClassifiers> > <eClassifiers xsi:type="ecore:EClass" name="RealLiteralExpCS" eSuperTypes="#//cst/PrimitiveLiteralExpCS"> >- <eStructuralFeatures xsi:type="ecore:EAttribute" name="realSymbol" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDoubleObject"/> >+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="realSymbol" eType="#//cst/Number"/> > </eClassifiers> > <eClassifiers xsi:type="ecore:EClass" name="StringLiteralExpCS" eSuperTypes="#//cst/PrimitiveLiteralExpCS"> > <eStructuralFeatures xsi:type="ecore:EAttribute" name="stringSymbol" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> >Index: model/OCLCST.genmodel >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/model/OCLCST.genmodel,v >retrieving revision 1.14 >diff -u -r1.14 OCLCST.genmodel >--- model/OCLCST.genmodel 15 Oct 2009 19:37:32 -0000 1.14 >+++ model/OCLCST.genmodel 12 Jan 2010 19:21:40 -0000 >@@ -70,6 +70,7 @@ > <genEnumLiterals xsi:type="genmodel:GenEnumLiteral" ecoreEnumLiteral="OCLCST.ecore#//cst/DotOrArrowEnum/arrow"/> > </genEnums> > <genDataTypes xsi:type="genmodel:GenDataType" ecoreDataType="OCLCST.ecore#//cst/IToken"/> >+ <genDataTypes xsi:type="genmodel:GenDataType" ecoreDataType="OCLCST.ecore#//cst/Number"/> > <genClasses xsi:type="genmodel:GenClass" image="false" ecoreClass="OCLCST.ecore#//cst/CSTNode"> > <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute OCLCST.ecore#//cst/CSTNode/startOffset"/> > <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute OCLCST.ecore#//cst/CSTNode/endOffset"/> >Index: model/OCLCST.uml >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/model/OCLCST.uml,v >retrieving revision 1.12 >diff -u -r1.12 OCLCST.uml >--- model/OCLCST.uml 27 Dec 2009 15:49:52 -0000 1.12 >+++ model/OCLCST.uml 12 Jan 2010 19:21:43 -0000 >@@ -508,22 +508,19 @@ > </packagedElement> > <packagedElement xmi:type="uml:Class" xmi:id="_qdx-A_8fEduhWtVvKtiQ7w" name="IntegerLiteralExpCS"> > <generalization xmi:id="_qdx-BP8fEduhWtVvKtiQ7w" general="_qdx9__8fEduhWtVvKtiQ7w"/> >- <ownedAttribute xmi:id="_qdx-Bf8fEduhWtVvKtiQ7w" name="integerSymbol" visibility="public" isOrdered="true"> >- <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml#EIntegerObject"/> >+ <ownedAttribute xmi:id="_qdx-Bf8fEduhWtVvKtiQ7w" name="integerSymbol" visibility="public" type="_7S9-8P9rEd67_agdSFnrQQ" isOrdered="true"> > <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_qdx-Bv8fEduhWtVvKtiQ7w"/> > </ownedAttribute> > </packagedElement> > <packagedElement xmi:type="uml:Class" xmi:id="_qdx-B_8fEduhWtVvKtiQ7w" name="UnlimitedNaturalLiteralExpCS"> > <generalization xmi:id="_qdx-CP8fEduhWtVvKtiQ7w" general="_qdx9__8fEduhWtVvKtiQ7w"/> >- <ownedAttribute xmi:id="_qdx-Cf8fEduhWtVvKtiQ7w" name="integerSymbol" visibility="public" isOrdered="true"> >- <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml#EIntegerObject"/> >+ <ownedAttribute xmi:id="_qdx-Cf8fEduhWtVvKtiQ7w" name="integerSymbol" visibility="public" type="_7S9-8P9rEd67_agdSFnrQQ" isOrdered="true"> > <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_qdx-Cv8fEduhWtVvKtiQ7w"/> > </ownedAttribute> > </packagedElement> > <packagedElement xmi:type="uml:Class" xmi:id="_qdx-C_8fEduhWtVvKtiQ7w" name="RealLiteralExpCS"> > <generalization xmi:id="_qdx-DP8fEduhWtVvKtiQ7w" general="_qdx9__8fEduhWtVvKtiQ7w"/> >- <ownedAttribute xmi:id="_qdx-Df8fEduhWtVvKtiQ7w" name="realSymbol" visibility="public" isOrdered="true"> >- <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml#EDoubleObject"/> >+ <ownedAttribute xmi:id="_qdx-Df8fEduhWtVvKtiQ7w" name="realSymbol" visibility="public" type="_7S9-8P9rEd67_agdSFnrQQ" isOrdered="true"> > <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_qdx-Dv8fEduhWtVvKtiQ7w"/> > </ownedAttribute> > </packagedElement> >@@ -681,6 +678,7 @@ > <packagedElement xmi:type="uml:Association" xmi:id="_z7wVcLZcEd6yDcYCBdIWCA" memberEnd="_tRI3kLZcEd6yDcYCBdIWCA _CiFFoLZdEd6yDcYCBdIWCA"> > <ownedEnd xmi:id="_CiFFoLZdEd6yDcYCBdIWCA" type="_qdx9C_8fEduhWtVvKtiQ7w" association="_z7wVcLZcEd6yDcYCBdIWCA"/> > </packagedElement> >+ <packagedElement xmi:type="uml:PrimitiveType" xmi:id="_7S9-8P9rEd67_agdSFnrQQ" name="Number"/> > </packagedElement> > <profileApplication xmi:id="_qdx-XP8fEduhWtVvKtiQ7w"> > <eAnnotations xmi:id="_qdx-Xf8fEduhWtVvKtiQ7w" source="http://www.eclipse.org/uml2/2.0.0/UML"> >@@ -856,4 +854,6 @@ > <Ecore:EClass xmi:id="_u2txsL8sEd2tbsirxV4pLA" base_Class="_WuZt4L8sEd2tbsirxV4pLA"/> > <Ecore:EReference xmi:id="_xEai4L8tEd2tbsirxV4pLA" base_Property="_woRO4L8sEd2tbsirxV4pLA"/> > <Ecore:EAttribute xmi:id="_K42H8AKSEd6O0MANVU0HEw" base_Property="_HPVqoAKSEd6O0MANVU0HEw"/> >+ <Ecore:EAttribute xmi:id="_GDcw4P9qEd67_agdSFnrQQ"/> >+ <Ecore:EDataType xmi:id="__GNnEP9rEd67_agdSFnrQQ" instanceClassName="java.lang.Number" base_PrimitiveType="_7S9-8P9rEd67_agdSFnrQQ"/> > </xmi:XMI> >Index: src/org/eclipse/ocl/cst/CSTPackage.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/cst/CSTPackage.java,v >retrieving revision 1.14 >diff -u -r1.14 CSTPackage.java >--- src/org/eclipse/ocl/cst/CSTPackage.java 27 Dec 2009 15:49:51 -0000 1.14 >+++ src/org/eclipse/ocl/cst/CSTPackage.java 12 Jan 2010 19:21:48 -0000 >@@ -3668,8 +3668,6 @@ > /** > * The feature id for the '<em><b>Real Symbol</b></em>' attribute. > * <!-- begin-user-doc --> >- * This value may change when the model code is regenerated. >- * It is subject to change without notice. > * <!-- end-user-doc --> > * @generated > * @ordered >@@ -5204,6 +5202,16 @@ > int ITOKEN = 54; > > /** >+ * The meta object id for the '<em>Number</em>' data type. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see java.lang.Number >+ * @see org.eclipse.ocl.cst.impl.CSTPackageImpl#getNumber() >+ * @generated >+ */ >+ int NUMBER = 55; >+ >+ /** > * Returns the meta object for class '{@link org.eclipse.ocl.cst.CSTNode <em>Node</em>}'. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >@@ -6627,6 +6635,17 @@ > EDataType getIToken(); > > /** >+ * Returns the meta object for data type '{@link java.lang.Number <em>Number</em>}'. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @return the meta object for data type '<em>Number</em>'. >+ * @see java.lang.Number >+ * @model instanceClass="java.lang.Number" >+ * @generated >+ */ >+ EDataType getNumber(); >+ >+ /** > * Returns the factory that creates the instances of the model. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >@@ -7904,6 +7923,16 @@ > */ > EDataType ITOKEN = eINSTANCE.getIToken(); > >+ /** >+ * The meta object literal for the '<em>Number</em>' data type. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see java.lang.Number >+ * @see org.eclipse.ocl.cst.impl.CSTPackageImpl#getNumber() >+ * @generated >+ */ >+ EDataType NUMBER = eINSTANCE.getNumber(); >+ > } > > } //CSTPackage >Index: src/org/eclipse/ocl/cst/IntegerLiteralExpCS.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/cst/IntegerLiteralExpCS.java,v >retrieving revision 1.4 >diff -u -r1.4 IntegerLiteralExpCS.java >--- src/org/eclipse/ocl/cst/IntegerLiteralExpCS.java 22 Dec 2009 18:42:30 -0000 1.4 >+++ src/org/eclipse/ocl/cst/IntegerLiteralExpCS.java 12 Jan 2010 19:21:48 -0000 >@@ -43,23 +43,25 @@ > * If the meaning of the '<em>Integer Symbol</em>' attribute isn't clear, > * there really should be more of a description here... > * </p> >+ * @since 3.0 > * <!-- end-user-doc --> > * @return the value of the '<em>Integer Symbol</em>' attribute. >- * @see #setIntegerSymbol(Integer) >+ * @see #setIntegerSymbol(Number) > * @see org.eclipse.ocl.cst.CSTPackage#getIntegerLiteralExpCS_IntegerSymbol() >- * @model >+ * @model dataType="org.eclipse.ocl.cst.Number" > * @generated > */ >- Integer getIntegerSymbol(); >+ Number getIntegerSymbol(); > > /** > * Sets the value of the '{@link org.eclipse.ocl.cst.IntegerLiteralExpCS#getIntegerSymbol <em>Integer Symbol</em>}' attribute. > * <!-- begin-user-doc --> >+ * @since 3.0 > * <!-- end-user-doc --> > * @param value the new value of the '<em>Integer Symbol</em>' attribute. > * @see #getIntegerSymbol() > * @generated > */ >- void setIntegerSymbol(Integer value); >+ void setIntegerSymbol(Number value); > > } // IntegerLiteralExpCS >Index: src/org/eclipse/ocl/cst/RealLiteralExpCS.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/cst/RealLiteralExpCS.java,v >retrieving revision 1.4 >diff -u -r1.4 RealLiteralExpCS.java >--- src/org/eclipse/ocl/cst/RealLiteralExpCS.java 22 Dec 2009 18:42:30 -0000 1.4 >+++ src/org/eclipse/ocl/cst/RealLiteralExpCS.java 12 Jan 2010 19:21:48 -0000 >@@ -43,23 +43,25 @@ > * If the meaning of the '<em>Real Symbol</em>' attribute isn't clear, > * there really should be more of a description here... > * </p> >+ * @since 3.0 > * <!-- end-user-doc --> > * @return the value of the '<em>Real Symbol</em>' attribute. >- * @see #setRealSymbol(Double) >+ * @see #setRealSymbol(Number) > * @see org.eclipse.ocl.cst.CSTPackage#getRealLiteralExpCS_RealSymbol() >- * @model >+ * @model dataType="org.eclipse.ocl.cst.Number" > * @generated > */ >- Double getRealSymbol(); >+ Number getRealSymbol(); > > /** > * Sets the value of the '{@link org.eclipse.ocl.cst.RealLiteralExpCS#getRealSymbol <em>Real Symbol</em>}' attribute. > * <!-- begin-user-doc --> >+ * @since 3.0 > * <!-- end-user-doc --> > * @param value the new value of the '<em>Real Symbol</em>' attribute. > * @see #getRealSymbol() > * @generated > */ >- void setRealSymbol(Double value); >+ void setRealSymbol(Number value); > > } // RealLiteralExpCS >Index: src/org/eclipse/ocl/cst/UnlimitedNaturalLiteralExpCS.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/cst/UnlimitedNaturalLiteralExpCS.java,v >retrieving revision 1.4 >diff -u -r1.4 UnlimitedNaturalLiteralExpCS.java >--- src/org/eclipse/ocl/cst/UnlimitedNaturalLiteralExpCS.java 22 Dec 2009 18:42:30 -0000 1.4 >+++ src/org/eclipse/ocl/cst/UnlimitedNaturalLiteralExpCS.java 12 Jan 2010 19:21:48 -0000 >@@ -43,23 +43,25 @@ > * If the meaning of the '<em>Integer Symbol</em>' attribute isn't clear, > * there really should be more of a description here... > * </p> >+ * @since 3.0 > * <!-- end-user-doc --> > * @return the value of the '<em>Integer Symbol</em>' attribute. >- * @see #setIntegerSymbol(Integer) >+ * @see #setIntegerSymbol(Number) > * @see org.eclipse.ocl.cst.CSTPackage#getUnlimitedNaturalLiteralExpCS_IntegerSymbol() >- * @model >+ * @model dataType="org.eclipse.ocl.cst.Number" > * @generated > */ >- Integer getIntegerSymbol(); >+ Number getIntegerSymbol(); > > /** > * Sets the value of the '{@link org.eclipse.ocl.cst.UnlimitedNaturalLiteralExpCS#getIntegerSymbol <em>Integer Symbol</em>}' attribute. > * <!-- begin-user-doc --> >+ * @since 3.0 > * <!-- end-user-doc --> > * @param value the new value of the '<em>Integer Symbol</em>' attribute. > * @see #getIntegerSymbol() > * @generated > */ >- void setIntegerSymbol(Integer value); >+ void setIntegerSymbol(Number value); > > } // UnlimitedNaturalLiteralExpCS >Index: src/org/eclipse/ocl/cst/impl/CSTFactoryImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/cst/impl/CSTFactoryImpl.java,v >retrieving revision 1.9 >diff -u -r1.9 CSTFactoryImpl.java >--- src/org/eclipse/ocl/cst/impl/CSTFactoryImpl.java 27 Dec 2009 15:49:51 -0000 1.9 >+++ src/org/eclipse/ocl/cst/impl/CSTFactoryImpl.java 12 Jan 2010 19:21:49 -0000 >@@ -74,6 +74,7 @@ > import org.eclipse.ocl.cst.UnlimitedNaturalLiteralExpCS; > import org.eclipse.ocl.cst.VariableCS; > import org.eclipse.ocl.cst.VariableExpCS; >+import org.eclipse.ocl.util.ObjectUtil; > > /** > * <!-- begin-user-doc --> >@@ -234,6 +235,8 @@ > return createDotOrArrowEnumFromString(eDataType, initialValue); > case CSTPackage.ITOKEN : > return createITokenFromString(eDataType, initialValue); >+ case CSTPackage.NUMBER : >+ return createNumberFromString(eDataType, initialValue); > default : > throw new IllegalArgumentException( > "The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ >@@ -262,6 +265,8 @@ > return convertDotOrArrowEnumToString(eDataType, instanceValue); > case CSTPackage.ITOKEN : > return convertITokenToString(eDataType, instanceValue); >+ case CSTPackage.NUMBER : >+ return convertNumberToString(eDataType, instanceValue); > default : > throw new IllegalArgumentException( > "The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ >@@ -818,6 +823,32 @@ > > /** > * <!-- begin-user-doc --> >+ * @since 3.0 >+ * <!-- end-user-doc --> >+ * @generated NOT >+ */ >+ public Number createNumberFromString(EDataType eDataType, >+ String initialValue) { >+ if (initialValue.contains(".") || initialValue.contains("e") || initialValue.contains("E")) { //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ >+ return ObjectUtil.createRealNumber(initialValue); >+ } else { >+ return ObjectUtil.createIntegerNumber(initialValue); >+ } >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * @since 3.0 >+ * <!-- end-user-doc --> >+ * @generated NOT >+ */ >+ public String convertNumberToString(EDataType eDataType, >+ Object instanceValue) { >+ return instanceValue.toString(); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> > * <!-- end-user-doc --> > * @generated > */ >Index: src/org/eclipse/ocl/cst/impl/CSTPackageImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/cst/impl/CSTPackageImpl.java,v >retrieving revision 1.14 >diff -u -r1.14 CSTPackageImpl.java >--- src/org/eclipse/ocl/cst/impl/CSTPackageImpl.java 27 Dec 2009 15:49:51 -0000 1.14 >+++ src/org/eclipse/ocl/cst/impl/CSTPackageImpl.java 12 Jan 2010 19:21:50 -0000 >@@ -477,6 +477,13 @@ > * <!-- end-user-doc --> > * @generated > */ >+ private EDataType numberEDataType = null; >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ > private EEnum messageExpKindEEnum = null; > > /** >@@ -1786,6 +1793,16 @@ > > /** > * <!-- begin-user-doc --> >+ * @since 3.0 >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public EDataType getNumber() { >+ return numberEDataType; >+ } >+ >+ /** >+ * <!-- begin-user-doc --> > * <!-- end-user-doc --> > * @generated > */ >@@ -2040,6 +2057,7 @@ > > // Create data types > iTokenEDataType = createEDataType(ITOKEN); >+ numberEDataType = createEDataType(NUMBER); > } > > /** >@@ -2589,7 +2607,7 @@ > "IntegerLiteralExpCS", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ > initEAttribute( > getIntegerLiteralExpCS_IntegerSymbol(), >- ecorePackage.getEIntegerObject(), >+ this.getNumber(), > "integerSymbol", null, 0, 1, IntegerLiteralExpCS.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ > > initEClass( >@@ -2598,7 +2616,7 @@ > "UnlimitedNaturalLiteralExpCS", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ > initEAttribute( > getUnlimitedNaturalLiteralExpCS_IntegerSymbol(), >- ecorePackage.getEIntegerObject(), >+ this.getNumber(), > "integerSymbol", null, 0, 1, UnlimitedNaturalLiteralExpCS.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ > > initEClass( >@@ -2607,7 +2625,7 @@ > "RealLiteralExpCS", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ > initEAttribute( > getRealLiteralExpCS_RealSymbol(), >- ecorePackage.getEDoubleObject(), >+ this.getNumber(), > "realSymbol", null, 0, 1, RealLiteralExpCS.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ > > initEClass( >@@ -2787,6 +2805,8 @@ > // Initialize data types > initEDataType(iTokenEDataType, IToken.class, > "IToken", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ >+ initEDataType(numberEDataType, Number.class, >+ "Number", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ > > // Create resource > createResource(eNS_URI); >@@ -2803,7 +2823,7 @@ > * @generated > */ > protected void createExtendedMetaDataAnnotations() { >- String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; //$NON-NLS-1$ >+ String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; //$NON-NLS-1$ > addAnnotation(oclExpressionCSEClass, source, new String[]{ > "name", "OclExpressionCS" //$NON-NLS-1$ //$NON-NLS-2$ > }); >Index: src/org/eclipse/ocl/cst/impl/IntegerLiteralExpCSImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/cst/impl/IntegerLiteralExpCSImpl.java,v >retrieving revision 1.3 >diff -u -r1.3 IntegerLiteralExpCSImpl.java >--- src/org/eclipse/ocl/cst/impl/IntegerLiteralExpCSImpl.java 30 Nov 2008 22:11:37 -0000 1.3 >+++ src/org/eclipse/ocl/cst/impl/IntegerLiteralExpCSImpl.java 12 Jan 2010 19:21:50 -0000 >@@ -48,7 +48,7 @@ > * @generated > * @ordered > */ >- protected static final Integer INTEGER_SYMBOL_EDEFAULT = null; >+ protected static final Number INTEGER_SYMBOL_EDEFAULT = null; > > /** > * The cached value of the '{@link #getIntegerSymbol() <em>Integer Symbol</em>}' attribute. >@@ -58,7 +58,7 @@ > * @generated > * @ordered > */ >- protected Integer integerSymbol = INTEGER_SYMBOL_EDEFAULT; >+ protected Number integerSymbol = INTEGER_SYMBOL_EDEFAULT; > > /** > * <!-- begin-user-doc --> >@@ -81,20 +81,22 @@ > > /** > * <!-- begin-user-doc --> >+ * @since 3.0 > * <!-- end-user-doc --> > * @generated > */ >- public Integer getIntegerSymbol() { >+ public Number getIntegerSymbol() { > return integerSymbol; > } > > /** > * <!-- begin-user-doc --> >+ * @since 3.0 > * <!-- end-user-doc --> > * @generated > */ >- public void setIntegerSymbol(Integer newIntegerSymbol) { >- Integer oldIntegerSymbol = integerSymbol; >+ public void setIntegerSymbol(Number newIntegerSymbol) { >+ Number oldIntegerSymbol = integerSymbol; > integerSymbol = newIntegerSymbol; > if (eNotificationRequired()) > eNotify(new ENotificationImpl(this, Notification.SET, >@@ -125,7 +127,7 @@ > public void eSet(int featureID, Object newValue) { > switch (featureID) { > case CSTPackage.INTEGER_LITERAL_EXP_CS__INTEGER_SYMBOL : >- setIntegerSymbol((Integer) newValue); >+ setIntegerSymbol((Number) newValue); > return; > } > super.eSet(featureID, newValue); >Index: src/org/eclipse/ocl/cst/impl/RealLiteralExpCSImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/cst/impl/RealLiteralExpCSImpl.java,v >retrieving revision 1.3 >diff -u -r1.3 RealLiteralExpCSImpl.java >--- src/org/eclipse/ocl/cst/impl/RealLiteralExpCSImpl.java 30 Nov 2008 22:11:37 -0000 1.3 >+++ src/org/eclipse/ocl/cst/impl/RealLiteralExpCSImpl.java 12 Jan 2010 19:21:51 -0000 >@@ -48,7 +48,7 @@ > * @generated > * @ordered > */ >- protected static final Double REAL_SYMBOL_EDEFAULT = null; >+ protected static final Number REAL_SYMBOL_EDEFAULT = null; > > /** > * The cached value of the '{@link #getRealSymbol() <em>Real Symbol</em>}' attribute. >@@ -58,7 +58,7 @@ > * @generated > * @ordered > */ >- protected Double realSymbol = REAL_SYMBOL_EDEFAULT; >+ protected Number realSymbol = REAL_SYMBOL_EDEFAULT; > > /** > * <!-- begin-user-doc --> >@@ -81,20 +81,22 @@ > > /** > * <!-- begin-user-doc --> >+ * @since 3.0 > * <!-- end-user-doc --> > * @generated > */ >- public Double getRealSymbol() { >+ public Number getRealSymbol() { > return realSymbol; > } > > /** > * <!-- begin-user-doc --> >+ * @since 3.0 > * <!-- end-user-doc --> > * @generated > */ >- public void setRealSymbol(Double newRealSymbol) { >- Double oldRealSymbol = realSymbol; >+ public void setRealSymbol(Number newRealSymbol) { >+ Number oldRealSymbol = realSymbol; > realSymbol = newRealSymbol; > if (eNotificationRequired()) > eNotify(new ENotificationImpl(this, Notification.SET, >@@ -125,7 +127,7 @@ > public void eSet(int featureID, Object newValue) { > switch (featureID) { > case CSTPackage.REAL_LITERAL_EXP_CS__REAL_SYMBOL : >- setRealSymbol((Double) newValue); >+ setRealSymbol((Number) newValue); > return; > } > super.eSet(featureID, newValue); >Index: src/org/eclipse/ocl/cst/impl/UnlimitedNaturalLiteralExpCSImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/cst/impl/UnlimitedNaturalLiteralExpCSImpl.java,v >retrieving revision 1.3 >diff -u -r1.3 UnlimitedNaturalLiteralExpCSImpl.java >--- src/org/eclipse/ocl/cst/impl/UnlimitedNaturalLiteralExpCSImpl.java 30 Nov 2008 22:11:37 -0000 1.3 >+++ src/org/eclipse/ocl/cst/impl/UnlimitedNaturalLiteralExpCSImpl.java 12 Jan 2010 19:21:51 -0000 >@@ -48,7 +48,7 @@ > * @generated > * @ordered > */ >- protected static final Integer INTEGER_SYMBOL_EDEFAULT = null; >+ protected static final Number INTEGER_SYMBOL_EDEFAULT = null; > > /** > * The cached value of the '{@link #getIntegerSymbol() <em>Integer Symbol</em>}' attribute. >@@ -58,7 +58,7 @@ > * @generated > * @ordered > */ >- protected Integer integerSymbol = INTEGER_SYMBOL_EDEFAULT; >+ protected Number integerSymbol = INTEGER_SYMBOL_EDEFAULT; > > /** > * <!-- begin-user-doc --> >@@ -81,20 +81,22 @@ > > /** > * <!-- begin-user-doc --> >+ * @since 3.0 > * <!-- end-user-doc --> > * @generated > */ >- public Integer getIntegerSymbol() { >+ public Number getIntegerSymbol() { > return integerSymbol; > } > > /** > * <!-- begin-user-doc --> >+ * @since 3.0 > * <!-- end-user-doc --> > * @generated > */ >- public void setIntegerSymbol(Integer newIntegerSymbol) { >- Integer oldIntegerSymbol = integerSymbol; >+ public void setIntegerSymbol(Number newIntegerSymbol) { >+ Number oldIntegerSymbol = integerSymbol; > integerSymbol = newIntegerSymbol; > if (eNotificationRequired()) > eNotify(new ENotificationImpl(this, Notification.SET, >@@ -125,7 +127,7 @@ > public void eSet(int featureID, Object newValue) { > switch (featureID) { > case CSTPackage.UNLIMITED_NATURAL_LITERAL_EXP_CS__INTEGER_SYMBOL : >- setIntegerSymbol((Integer) newValue); >+ setIntegerSymbol((Number) newValue); > return; > } > super.eSet(featureID, newValue); >Index: src/org/eclipse/ocl/expressions/IntegerLiteralExp.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/IntegerLiteralExp.java,v >retrieving revision 1.7 >diff -u -r1.7 IntegerLiteralExp.java >--- src/org/eclipse/ocl/expressions/IntegerLiteralExp.java 22 Dec 2009 18:53:30 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/IntegerLiteralExp.java 12 Jan 2010 19:21:51 -0000 >@@ -46,24 +46,26 @@ > * If the meaning of the '<em>Integer Symbol</em>' attribute isn't clear, > * there really should be more of a description here... > * </p> >+ * @since 3.0 > * <!-- end-user-doc --> > * @return the value of the '<em>Integer Symbol</em>' attribute. >- * @see #setIntegerSymbol(Integer) >+ * @see #setIntegerSymbol(Number) > * @see org.eclipse.ocl.expressions.ExpressionsPackage#getIntegerLiteralExp_IntegerSymbol() >- * @model >+ * @model dataType="org.eclipse.ocl.utilities.Number" > * @generated > */ >- Integer getIntegerSymbol(); >+ Number getIntegerSymbol(); > > /** > * Sets the value of the '{@link org.eclipse.ocl.expressions.IntegerLiteralExp#getIntegerSymbol <em>Integer Symbol</em>}' attribute. > * <!-- begin-user-doc --> >+ * @since 3.0 > * <!-- end-user-doc --> > * @param value the new value of the '<em>Integer Symbol</em>' attribute. > * @see #getIntegerSymbol() > * @generated > */ >- void setIntegerSymbol(Integer value); >+ void setIntegerSymbol(Number value); > > /** > * <!-- begin-user-doc --> >Index: src/org/eclipse/ocl/expressions/RealLiteralExp.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/RealLiteralExp.java,v >retrieving revision 1.7 >diff -u -r1.7 RealLiteralExp.java >--- src/org/eclipse/ocl/expressions/RealLiteralExp.java 22 Dec 2009 18:53:30 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/RealLiteralExp.java 12 Jan 2010 19:21:51 -0000 >@@ -46,24 +46,26 @@ > * If the meaning of the '<em>Real Symbol</em>' attribute isn't clear, > * there really should be more of a description here... > * </p> >+ * @since 3.0 > * <!-- end-user-doc --> > * @return the value of the '<em>Real Symbol</em>' attribute. >- * @see #setRealSymbol(Double) >+ * @see #setRealSymbol(Number) > * @see org.eclipse.ocl.expressions.ExpressionsPackage#getRealLiteralExp_RealSymbol() >- * @model >+ * @model dataType="org.eclipse.ocl.utilities.Number" > * @generated > */ >- Double getRealSymbol(); >+ Number getRealSymbol(); > > /** > * Sets the value of the '{@link org.eclipse.ocl.expressions.RealLiteralExp#getRealSymbol <em>Real Symbol</em>}' attribute. > * <!-- begin-user-doc --> >+ * @since 3.0 > * <!-- end-user-doc --> > * @param value the new value of the '<em>Real Symbol</em>' attribute. > * @see #getRealSymbol() > * @generated > */ >- void setRealSymbol(Double value); >+ void setRealSymbol(Number value); > > /** > * <!-- begin-user-doc --> >Index: src/org/eclipse/ocl/expressions/UnlimitedNaturalLiteralExp.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/UnlimitedNaturalLiteralExp.java,v >retrieving revision 1.8 >diff -u -r1.8 UnlimitedNaturalLiteralExp.java >--- src/org/eclipse/ocl/expressions/UnlimitedNaturalLiteralExp.java 22 Dec 2009 18:53:30 -0000 1.8 >+++ src/org/eclipse/ocl/expressions/UnlimitedNaturalLiteralExp.java 12 Jan 2010 19:21:51 -0000 >@@ -50,24 +50,26 @@ > * If the meaning of the '<em>Integer Symbol</em>' attribute isn't clear, > * there really should be more of a description here... > * </p> >+ * @since 3.0 > * <!-- end-user-doc --> > * @return the value of the '<em>Integer Symbol</em>' attribute. >- * @see #setIntegerSymbol(Integer) >+ * @see #setIntegerSymbol(Number) > * @see org.eclipse.ocl.expressions.ExpressionsPackage#getUnlimitedNaturalLiteralExp_IntegerSymbol() >- * @model >+ * @model dataType="org.eclipse.ocl.utilities.Number" > * @generated > */ >- Integer getIntegerSymbol(); >+ Number getIntegerSymbol(); > > /** > * Sets the value of the '{@link org.eclipse.ocl.expressions.UnlimitedNaturalLiteralExp#getIntegerSymbol <em>Integer Symbol</em>}' attribute. > * <!-- begin-user-doc --> >+ * @since 3.0 > * <!-- end-user-doc --> > * @param value the new value of the '<em>Integer Symbol</em>' attribute. > * @see #getIntegerSymbol() > * @generated > */ >- void setIntegerSymbol(Integer value); >+ void setIntegerSymbol(Number value); > > /** > * Returns the value of the '<em><b>Unlimited</b></em>' attribute. >Index: src/org/eclipse/ocl/expressions/impl/ExpressionsPackageImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/ExpressionsPackageImpl.java,v >retrieving revision 1.11 >diff -u -r1.11 ExpressionsPackageImpl.java >--- src/org/eclipse/ocl/expressions/impl/ExpressionsPackageImpl.java 26 May 2009 20:06:35 -0000 1.11 >+++ src/org/eclipse/ocl/expressions/impl/ExpressionsPackageImpl.java 12 Jan 2010 19:21:53 -0000 >@@ -1951,7 +1951,7 @@ > "IntegerLiteralExp", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ > initEAttribute( > getIntegerLiteralExp_IntegerSymbol(), >- ecorePackage.getEIntegerObject(), >+ theUtilitiesPackage.getNumber(), > "integerSymbol", null, 0, 1, IntegerLiteralExp.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ > > op = addEOperation(integerLiteralExpEClass, ecorePackage.getEBoolean(), >@@ -1976,7 +1976,7 @@ > "UnlimitedNaturalLiteralExp", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ > initEAttribute( > getUnlimitedNaturalLiteralExp_IntegerSymbol(), >- ecorePackage.getEIntegerObject(), >+ theUtilitiesPackage.getNumber(), > "integerSymbol", null, 0, 1, UnlimitedNaturalLiteralExp.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ > initEAttribute( > getUnlimitedNaturalLiteralExp_Unlimited(), >@@ -2378,7 +2378,7 @@ > "RealLiteralExp", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ > initEAttribute( > getRealLiteralExp_RealSymbol(), >- ecorePackage.getEDoubleObject(), >+ theUtilitiesPackage.getNumber(), > "realSymbol", null, 0, 1, RealLiteralExp.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ > > op = addEOperation(realLiteralExpEClass, ecorePackage.getEBoolean(), >@@ -2553,7 +2553,7 @@ > * @generated > */ > protected void createExtendedMetaDataAnnotations() { >- String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; //$NON-NLS-1$ >+ String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; //$NON-NLS-1$ > addAnnotation(oclExpressionEClass, source, new String[]{ > "name", "OclExpression" //$NON-NLS-1$ //$NON-NLS-2$ > }); >Index: src/org/eclipse/ocl/expressions/impl/IntegerLiteralExpImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/IntegerLiteralExpImpl.java,v >retrieving revision 1.7 >diff -u -r1.7 IntegerLiteralExpImpl.java >--- src/org/eclipse/ocl/expressions/impl/IntegerLiteralExpImpl.java 23 Jan 2009 17:16:04 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/impl/IntegerLiteralExpImpl.java 12 Jan 2010 19:21:53 -0000 >@@ -52,7 +52,7 @@ > * @generated > * @ordered > */ >- protected static final Integer INTEGER_SYMBOL_EDEFAULT = null; >+ protected static final Number INTEGER_SYMBOL_EDEFAULT = null; > > /** > * The cached value of the '{@link #getIntegerSymbol() <em>Integer Symbol</em>}' attribute. >@@ -62,7 +62,7 @@ > * @generated > * @ordered > */ >- protected Integer integerSymbol = INTEGER_SYMBOL_EDEFAULT; >+ protected Number integerSymbol = INTEGER_SYMBOL_EDEFAULT; > > /** > * <!-- begin-user-doc --> >@@ -88,7 +88,7 @@ > * <!-- end-user-doc --> > * @generated > */ >- public Integer getIntegerSymbol() { >+ public Number getIntegerSymbol() { > return integerSymbol; > } > >@@ -97,8 +97,8 @@ > * <!-- end-user-doc --> > * @generated > */ >- public void setIntegerSymbol(Integer newIntegerSymbol) { >- Integer oldIntegerSymbol = integerSymbol; >+ public void setIntegerSymbol(Number newIntegerSymbol) { >+ Number oldIntegerSymbol = integerSymbol; > integerSymbol = newIntegerSymbol; > if (eNotificationRequired()) > eNotify(new ENotificationImpl(this, Notification.SET, >@@ -140,7 +140,7 @@ > public void eSet(int featureID, Object newValue) { > switch (featureID) { > case ExpressionsPackage.INTEGER_LITERAL_EXP__INTEGER_SYMBOL : >- setIntegerSymbol((Integer) newValue); >+ setIntegerSymbol((Number) newValue); > return; > } > super.eSet(featureID, newValue); >Index: src/org/eclipse/ocl/expressions/impl/RealLiteralExpImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/RealLiteralExpImpl.java,v >retrieving revision 1.7 >diff -u -r1.7 RealLiteralExpImpl.java >--- src/org/eclipse/ocl/expressions/impl/RealLiteralExpImpl.java 23 Jan 2009 17:16:03 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/impl/RealLiteralExpImpl.java 12 Jan 2010 19:21:53 -0000 >@@ -52,7 +52,7 @@ > * @generated > * @ordered > */ >- protected static final Double REAL_SYMBOL_EDEFAULT = null; >+ protected static final Number REAL_SYMBOL_EDEFAULT = null; > > /** > * The cached value of the '{@link #getRealSymbol() <em>Real Symbol</em>}' attribute. >@@ -62,7 +62,7 @@ > * @generated > * @ordered > */ >- protected Double realSymbol = REAL_SYMBOL_EDEFAULT; >+ protected Number realSymbol = REAL_SYMBOL_EDEFAULT; > > /** > * <!-- begin-user-doc --> >@@ -88,7 +88,7 @@ > * <!-- end-user-doc --> > * @generated > */ >- public Double getRealSymbol() { >+ public Number getRealSymbol() { > return realSymbol; > } > >@@ -97,8 +97,8 @@ > * <!-- end-user-doc --> > * @generated > */ >- public void setRealSymbol(Double newRealSymbol) { >- Double oldRealSymbol = realSymbol; >+ public void setRealSymbol(Number newRealSymbol) { >+ Number oldRealSymbol = realSymbol; > realSymbol = newRealSymbol; > if (eNotificationRequired()) > eNotify(new ENotificationImpl(this, Notification.SET, >@@ -140,7 +140,7 @@ > public void eSet(int featureID, Object newValue) { > switch (featureID) { > case ExpressionsPackage.REAL_LITERAL_EXP__REAL_SYMBOL : >- setRealSymbol((Double) newValue); >+ setRealSymbol((Number) newValue); > return; > } > super.eSet(featureID, newValue); >Index: src/org/eclipse/ocl/expressions/impl/UnlimitedNaturalLiteralExpImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/UnlimitedNaturalLiteralExpImpl.java,v >retrieving revision 1.8 >diff -u -r1.8 UnlimitedNaturalLiteralExpImpl.java >--- src/org/eclipse/ocl/expressions/impl/UnlimitedNaturalLiteralExpImpl.java 23 Jan 2009 17:16:04 -0000 1.8 >+++ src/org/eclipse/ocl/expressions/impl/UnlimitedNaturalLiteralExpImpl.java 12 Jan 2010 19:21:53 -0000 >@@ -56,7 +56,7 @@ > * @generated > * @ordered > */ >- protected static final Integer INTEGER_SYMBOL_EDEFAULT = null; >+ protected static final Number INTEGER_SYMBOL_EDEFAULT = null; > > /** > * The cached value of the '{@link #getIntegerSymbol() <em>Integer Symbol</em>}' attribute. >@@ -66,7 +66,7 @@ > * @generated > * @ordered > */ >- protected Integer integerSymbol = INTEGER_SYMBOL_EDEFAULT; >+ protected Number integerSymbol = INTEGER_SYMBOL_EDEFAULT; > > /** > * The default value of the '{@link #isUnlimited() <em>Unlimited</em>}' attribute. >@@ -99,20 +99,22 @@ > > /** > * <!-- begin-user-doc --> >+ * @since 3.0 > * <!-- end-user-doc --> > * @generated > */ >- public Integer getIntegerSymbol() { >+ public Number getIntegerSymbol() { > return integerSymbol; > } > > /** > * <!-- begin-user-doc --> >+ * @since 3.0 > * <!-- end-user-doc --> > * @generated > */ >- public void setIntegerSymbol(Integer newIntegerSymbol) { >- Integer oldIntegerSymbol = integerSymbol; >+ public void setIntegerSymbol(Number newIntegerSymbol) { >+ Number oldIntegerSymbol = integerSymbol; > integerSymbol = newIntegerSymbol; > if (eNotificationRequired()) > eNotify(new ENotificationImpl( >@@ -128,7 +130,7 @@ > * @generated NOT > */ > public boolean isUnlimited() { >- return getIntegerSymbol() == UNLIMITED; >+ return getIntegerSymbol().intValue() == UNLIMITED; > } > > /** >@@ -167,7 +169,7 @@ > public void eSet(int featureID, Object newValue) { > switch (featureID) { > case ExpressionsPackage.UNLIMITED_NATURAL_LITERAL_EXP__INTEGER_SYMBOL : >- setIntegerSymbol((Integer) newValue); >+ setIntegerSymbol((Number) newValue); > return; > } > super.eSet(featureID, newValue); >Index: src/org/eclipse/ocl/expressions/operations/MessageExpOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/operations/MessageExpOperations.java,v >retrieving revision 1.4 >diff -u -r1.4 MessageExpOperations.java >--- src/org/eclipse/ocl/expressions/operations/MessageExpOperations.java 25 Jun 2009 19:23:52 -0000 1.4 >+++ src/org/eclipse/ocl/expressions/operations/MessageExpOperations.java 12 Jan 2010 19:21:53 -0000 >@@ -342,7 +342,8 @@ > boolean result = true; > > OCLExpression<C> target = messageExp.getTarget(); >- if ((target != null) && (target.getType() instanceof CollectionType<?, ?>)) { >+ if ((target != null) >+ && (target.getType() instanceof CollectionType<?, ?>)) { > result = false; > } > >Index: src/org/eclipse/ocl/parser/AbstractOCLParser.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/parser/AbstractOCLParser.java,v >retrieving revision 1.12 >diff -u -r1.12 AbstractOCLParser.java >--- src/org/eclipse/ocl/parser/AbstractOCLParser.java 27 Dec 2009 15:49:44 -0000 1.12 >+++ src/org/eclipse/ocl/parser/AbstractOCLParser.java 12 Jan 2010 19:21:53 -0000 >@@ -86,6 +86,7 @@ > import org.eclipse.ocl.lpg.BasicEnvironment; > import org.eclipse.ocl.lpg.ProblemHandler; > import org.eclipse.ocl.options.ProblemOption; >+import org.eclipse.ocl.util.ObjectUtil; > > public abstract class AbstractOCLParser > extends AbstractParser { >@@ -491,7 +492,7 @@ > IntegerLiteralExpCS result = CSTFactory.eINSTANCE > .createIntegerLiteralExpCS(); > result.setSymbol(string); >- result.setIntegerSymbol(Integer.valueOf(string)); >+ result.setIntegerSymbol(ObjectUtil.createIntegerNumber(string)); > return result; > } > >@@ -504,7 +505,7 @@ > if ("*".equals(string)) { > result.setIntegerSymbol(-1); > } else { >- result.setIntegerSymbol(Integer.valueOf(string)); >+ result.setIntegerSymbol(ObjectUtil.createIntegerNumber(string)); > } > return result; > } >@@ -512,7 +513,7 @@ > protected RealLiteralExpCS createRealLiteralExpCS(String string) { > RealLiteralExpCS result = CSTFactory.eINSTANCE.createRealLiteralExpCS(); > result.setSymbol(string); >- result.setRealSymbol(Double.valueOf(string)); >+ result.setRealSymbol(ObjectUtil.createRealNumber(string)); > return result; > } > >Index: src/org/eclipse/ocl/types/impl/TypesPackageImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/impl/TypesPackageImpl.java,v >retrieving revision 1.11 >diff -u -r1.11 TypesPackageImpl.java >--- src/org/eclipse/ocl/types/impl/TypesPackageImpl.java 6 Dec 2009 18:12:59 -0000 1.11 >+++ src/org/eclipse/ocl/types/impl/TypesPackageImpl.java 12 Jan 2010 19:21:54 -0000 >@@ -860,7 +860,7 @@ > * @generated > */ > protected void createDuplicatesAnnotations() { >- String source = "duplicates"; //$NON-NLS-1$ >+ String source = "duplicates"; //$NON-NLS-1$ > addAnnotation(bagTypeEClass, source, new String[]{}); > addAnnotation(orderedSetTypeEClass, source, new String[]{}); > addAnnotation(sequenceTypeEClass, source, new String[]{}); >Index: src/org/eclipse/ocl/util/ObjectUtil.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/util/ObjectUtil.java,v >retrieving revision 1.5 >diff -u -r1.5 ObjectUtil.java >--- src/org/eclipse/ocl/util/ObjectUtil.java 25 Jun 2009 19:23:52 -0000 1.5 >+++ src/org/eclipse/ocl/util/ObjectUtil.java 12 Jan 2010 19:21:55 -0000 >@@ -16,6 +16,8 @@ > */ > package org.eclipse.ocl.util; > >+import java.math.BigDecimal; >+import java.math.BigInteger; > import java.util.Collection; > import java.util.Iterator; > >@@ -32,6 +34,12 @@ > */ > public class ObjectUtil { > >+ private static final String maxIntegerValue = Integer.toString(Integer.MAX_VALUE); >+ private static final int maxIntegerSize = maxIntegerValue.length(); >+ private static final String maxLongValue = Long.toString(Long.MAX_VALUE); >+ private static final int maxLongSize = maxLongValue.length(); >+ private static final int epsilonSize = (int)Math.floor(-Math.log10(Math.ulp(1.0d))); >+ > /** > * Computes the equivalence of two objects, accounting for primitive numeric > * values that OCL considers equal but Java does not. This is also safe >@@ -109,6 +117,10 @@ > return 37 * ((Long) anObject).intValue(); > } else if (anObject instanceof Double) { > return 37 * ((Double) anObject).intValue(); >+ } else if (anObject instanceof BigDecimal) { >+ return 37 * ((BigDecimal) anObject).intValue(); >+ } else if (anObject instanceof BigInteger) { >+ return 37 * ((BigInteger) anObject).intValue(); > } else if (anObject instanceof String) { > return anObject.hashCode(); > } else if (anObject instanceof Boolean) { >@@ -133,8 +145,47 @@ > * @return whether it is an OCL primitive value > */ > public static boolean isPrimitive(Object o) { >- return o instanceof Integer || o instanceof Long || o instanceof String >- || o instanceof Boolean || o instanceof Double; >+ return o instanceof Integer || o instanceof Long || o instanceof BigInteger >+ || o instanceof String || o instanceof Boolean >+ || o instanceof Double || o instanceof BigDecimal; >+ } >+ >+ /** >+ * Creates a Double or BigDecimal representation for aValue. For a typical >+ * implementation of java.lang.Double, a Double is created if the length of >+ * aValue is less than 15 characters. >+ * @param aValue the string representation of a real number >+ * @return the numeric representation >+ * @throws NumberFormatException if representation cannot be created >+ * @since 3.0 >+ */ >+ public static Number createRealNumber(String aValue) { >+ if (aValue.length() < epsilonSize) { >+ return Double.valueOf(aValue); >+ } >+ else { >+ return new BigDecimal(aValue); >+ } >+ } >+ >+ /** >+ * Creates the smaller of an Integer or Long or BigInteger representation for aValue. >+ * @param aValue the string representation of an integer number >+ * @return the numeric representation >+ * @throws NumberFormatException if representation cannot be created >+ * @since 3.0 >+ */ >+ public static Number createIntegerNumber(String aValue) { >+ int len = aValue.length(); >+ if ((len < maxIntegerSize) || ((len == maxIntegerSize) && (maxIntegerValue.compareTo(aValue) >= 0))) { >+ return Integer.valueOf(aValue); >+ } >+ else if ((len < maxLongSize) || ((len == maxLongSize) && (maxLongValue.compareTo(aValue) >= 0))) { >+ return Long.valueOf(aValue); >+ } >+ else { >+ return new BigInteger(aValue); >+ } > } > > /** >Index: src/org/eclipse/ocl/utilities/UtilitiesPackage.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/utilities/UtilitiesPackage.java,v >retrieving revision 1.12 >diff -u -r1.12 UtilitiesPackage.java >--- src/org/eclipse/ocl/utilities/UtilitiesPackage.java 22 Dec 2009 18:54:07 -0000 1.12 >+++ src/org/eclipse/ocl/utilities/UtilitiesPackage.java 12 Jan 2010 19:21:55 -0000 >@@ -19,6 +19,7 @@ > > import org.eclipse.emf.ecore.EAttribute; > import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EDataType; > import org.eclipse.emf.ecore.EPackage; > import org.eclipse.emf.ecore.EReference; > >@@ -433,6 +434,17 @@ > int PREDEFINED_TYPE_FEATURE_COUNT = 0; > > /** >+ * The meta object id for the '<em>Number</em>' data type. >+ * <!-- begin-user-doc --> >+ * @since 3.0 >+ * <!-- end-user-doc --> >+ * @see java.lang.Number >+ * @see org.eclipse.ocl.utilities.impl.UtilitiesPackageImpl#getNumber() >+ * @generated >+ */ >+ int NUMBER = 8; >+ >+ /** > * Returns the meta object for class '{@link org.eclipse.ocl.utilities.ASTNode <em>AST Node</em>}'. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >@@ -507,6 +519,18 @@ > EClass getPredefinedType(); > > /** >+ * Returns the meta object for data type '{@link java.lang.Number <em>Number</em>}'. >+ * <!-- begin-user-doc --> >+ * @since 3.0 >+ * <!-- end-user-doc --> >+ * @return the meta object for data type '<em>Number</em>'. >+ * @see java.lang.Number >+ * @model instanceClass="java.lang.Number" >+ * @generated >+ */ >+ EDataType getNumber(); >+ >+ /** > * Returns the meta object for class '{@link org.eclipse.ocl.utilities.TypedASTNode <em>Typed AST Node</em>}'. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >@@ -725,6 +749,17 @@ > EClass PREDEFINED_TYPE = eINSTANCE.getPredefinedType(); > > /** >+ * The meta object literal for the '<em>Number</em>' data type. >+ * <!-- begin-user-doc --> >+ * @since 3.0 >+ * <!-- end-user-doc --> >+ * @see java.lang.Number >+ * @see org.eclipse.ocl.utilities.impl.UtilitiesPackageImpl#getNumber() >+ * @generated >+ */ >+ EDataType NUMBER = eINSTANCE.getNumber(); >+ >+ /** > * The meta object literal for the '{@link org.eclipse.ocl.utilities.TypedASTNode <em>Typed AST Node</em>}' class. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >Index: src/org/eclipse/ocl/utilities/impl/UtilitiesFactoryImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/utilities/impl/UtilitiesFactoryImpl.java,v >retrieving revision 1.6 >diff -u -r1.6 UtilitiesFactoryImpl.java >--- src/org/eclipse/ocl/utilities/impl/UtilitiesFactoryImpl.java 23 Jan 2009 17:16:04 -0000 1.6 >+++ src/org/eclipse/ocl/utilities/impl/UtilitiesFactoryImpl.java 12 Jan 2010 19:21:55 -0000 >@@ -16,12 +16,12 @@ > package org.eclipse.ocl.utilities.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.ocl.utilities.*; >+import org.eclipse.ocl.util.ObjectUtil; > import org.eclipse.ocl.utilities.UtilitiesFactory; > import org.eclipse.ocl.utilities.UtilitiesPackage; > >@@ -83,6 +83,64 @@ > * <!-- end-user-doc --> > * @generated > */ >+ @Override >+ public Object createFromString(EDataType eDataType, String initialValue) { >+ switch (eDataType.getClassifierID()) { >+ case UtilitiesPackage.NUMBER : >+ return createNumberFromString(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 UtilitiesPackage.NUMBER : >+ return convertNumberToString(eDataType, instanceValue); >+ default : >+ throw new IllegalArgumentException( >+ "The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ >+ } >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * @since 3.0 >+ * <!-- end-user-doc --> >+ * @generated NOT >+ */ >+ public Number createNumberFromString(EDataType eDataType, >+ String initialValue) { >+ if (initialValue.contains(".") || initialValue.contains("e") || initialValue.contains("E")) { //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ >+ return ObjectUtil.createRealNumber(initialValue); >+ } else { >+ return ObjectUtil.createIntegerNumber(initialValue); >+ } >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * @since 3.0 >+ * <!-- end-user-doc --> >+ * @generated NOT >+ */ >+ public String convertNumberToString(EDataType eDataType, >+ Object instanceValue) { >+ return instanceValue.toString(); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ > public UtilitiesPackage getUtilitiesPackage() { > return (UtilitiesPackage) getEPackage(); > } >Index: src/org/eclipse/ocl/utilities/impl/UtilitiesPackageImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/utilities/impl/UtilitiesPackageImpl.java,v >retrieving revision 1.11 >diff -u -r1.11 UtilitiesPackageImpl.java >--- src/org/eclipse/ocl/utilities/impl/UtilitiesPackageImpl.java 6 Dec 2009 18:13:35 -0000 1.11 >+++ src/org/eclipse/ocl/utilities/impl/UtilitiesPackageImpl.java 12 Jan 2010 19:21:56 -0000 >@@ -18,6 +18,7 @@ > > import org.eclipse.emf.ecore.EAttribute; > import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EDataType; > import org.eclipse.emf.ecore.EGenericType; > import org.eclipse.emf.ecore.EOperation; > import org.eclipse.emf.ecore.EPackage; >@@ -75,6 +76,13 @@ > * <!-- end-user-doc --> > * @generated > */ >+ private EDataType numberEDataType = null; >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ > private EClass typedASTNodeEClass = null; > > /** >@@ -256,6 +264,15 @@ > * <!-- end-user-doc --> > * @generated > */ >+ public EDataType getNumber() { >+ return numberEDataType; >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ > public EClass getTypedASTNode() { > return typedASTNodeEClass; > } >@@ -428,6 +445,9 @@ > EXPRESSION_IN_OCL__GENERATED_TYPE); > > predefinedTypeEClass = createEClass(PREDEFINED_TYPE); >+ >+ // Create data types >+ numberEDataType = createEDataType(NUMBER); > } > > /** >@@ -948,6 +968,10 @@ > g1 = createEGenericType(predefinedTypeEClass_O); > initEOperation(op, g1); > >+ // Initialize data types >+ initEDataType(numberEDataType, Number.class, >+ "Number", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ >+ > // Create resource > createResource(eNS_URI); > >@@ -963,7 +987,7 @@ > * @generated > */ > protected void createExtendedMetaDataAnnotations() { >- String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; //$NON-NLS-1$ >+ String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; //$NON-NLS-1$ > addAnnotation(expressionInOCLEClass, source, new String[]{ > "name", "ExpressionInOcl" //$NON-NLS-1$ //$NON-NLS-2$ > }); >#P org.eclipse.ocl.ecore >Index: src/org/eclipse/ocl/ecore/impl/IntegerLiteralExpImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl.ecore/src/org/eclipse/ocl/ecore/impl/IntegerLiteralExpImpl.java,v >retrieving revision 1.9 >diff -u -r1.9 IntegerLiteralExpImpl.java >--- src/org/eclipse/ocl/ecore/impl/IntegerLiteralExpImpl.java 23 Jan 2009 17:16:23 -0000 1.9 >+++ src/org/eclipse/ocl/ecore/impl/IntegerLiteralExpImpl.java 12 Jan 2010 19:21:58 -0000 >@@ -63,7 +63,7 @@ > * @generated > * @ordered > */ >- protected static final Integer INTEGER_SYMBOL_EDEFAULT = null; >+ protected static final Number INTEGER_SYMBOL_EDEFAULT = null; > > /** > * The cached value of the '{@link #getIntegerSymbol() <em>Integer Symbol</em>}' attribute. >@@ -73,7 +73,7 @@ > * @generated > * @ordered > */ >- protected Integer integerSymbol = INTEGER_SYMBOL_EDEFAULT; >+ protected Number integerSymbol = INTEGER_SYMBOL_EDEFAULT; > > /** > * <!-- begin-user-doc --> >@@ -96,20 +96,22 @@ > > /** > * <!-- begin-user-doc --> >+ * @since 3.0 > * <!-- end-user-doc --> > * @generated > */ >- public Integer getIntegerSymbol() { >+ public Number getIntegerSymbol() { > return integerSymbol; > } > > /** > * <!-- begin-user-doc --> >+ * @since 3.0 > * <!-- end-user-doc --> > * @generated > */ >- public void setIntegerSymbol(Integer newIntegerSymbol) { >- Integer oldIntegerSymbol = integerSymbol; >+ public void setIntegerSymbol(Number newIntegerSymbol) { >+ Number oldIntegerSymbol = integerSymbol; > integerSymbol = newIntegerSymbol; > if (eNotificationRequired()) > eNotify(new ENotificationImpl(this, Notification.SET, >@@ -151,7 +153,7 @@ > public void eSet(int featureID, Object newValue) { > switch (featureID) { > case EcorePackage.INTEGER_LITERAL_EXP__INTEGER_SYMBOL : >- setIntegerSymbol((Integer) newValue); >+ setIntegerSymbol((Number) newValue); > return; > } > super.eSet(featureID, newValue); >Index: src/org/eclipse/ocl/ecore/impl/RealLiteralExpImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl.ecore/src/org/eclipse/ocl/ecore/impl/RealLiteralExpImpl.java,v >retrieving revision 1.8 >diff -u -r1.8 RealLiteralExpImpl.java >--- src/org/eclipse/ocl/ecore/impl/RealLiteralExpImpl.java 23 Jan 2009 17:16:23 -0000 1.8 >+++ src/org/eclipse/ocl/ecore/impl/RealLiteralExpImpl.java 12 Jan 2010 19:21:58 -0000 >@@ -63,7 +63,7 @@ > * @generated > * @ordered > */ >- protected static final Double REAL_SYMBOL_EDEFAULT = null; >+ protected static final Number REAL_SYMBOL_EDEFAULT = null; > > /** > * The cached value of the '{@link #getRealSymbol() <em>Real Symbol</em>}' attribute. >@@ -73,7 +73,7 @@ > * @generated > * @ordered > */ >- protected Double realSymbol = REAL_SYMBOL_EDEFAULT; >+ protected Number realSymbol = REAL_SYMBOL_EDEFAULT; > > /** > * <!-- begin-user-doc --> >@@ -106,20 +106,22 @@ > > /** > * <!-- begin-user-doc --> >+ * @since 3.0 > * <!-- end-user-doc --> > * @generated > */ >- public Double getRealSymbol() { >+ public Number getRealSymbol() { > return realSymbol; > } > > /** > * <!-- begin-user-doc --> >+ * @since 3.0 > * <!-- end-user-doc --> > * @generated > */ >- public void setRealSymbol(Double newRealSymbol) { >- Double oldRealSymbol = realSymbol; >+ public void setRealSymbol(Number newRealSymbol) { >+ Number oldRealSymbol = realSymbol; > realSymbol = newRealSymbol; > if (eNotificationRequired()) > eNotify(new ENotificationImpl(this, Notification.SET, >@@ -161,7 +163,7 @@ > public void eSet(int featureID, Object newValue) { > switch (featureID) { > case EcorePackage.REAL_LITERAL_EXP__REAL_SYMBOL : >- setRealSymbol((Double) newValue); >+ setRealSymbol((Number) newValue); > return; > } > super.eSet(featureID, newValue); >Index: src/org/eclipse/ocl/ecore/impl/UnlimitedNaturalLiteralExpImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl.ecore/src/org/eclipse/ocl/ecore/impl/UnlimitedNaturalLiteralExpImpl.java,v >retrieving revision 1.8 >diff -u -r1.8 UnlimitedNaturalLiteralExpImpl.java >--- src/org/eclipse/ocl/ecore/impl/UnlimitedNaturalLiteralExpImpl.java 23 Jan 2009 17:16:21 -0000 1.8 >+++ src/org/eclipse/ocl/ecore/impl/UnlimitedNaturalLiteralExpImpl.java 12 Jan 2010 19:21:58 -0000 >@@ -64,7 +64,7 @@ > * @generated > * @ordered > */ >- protected static final Integer INTEGER_SYMBOL_EDEFAULT = null; >+ protected static final Number INTEGER_SYMBOL_EDEFAULT = null; > > /** > * The cached value of the '{@link #getIntegerSymbol() <em>Integer Symbol</em>}' attribute. >@@ -74,7 +74,7 @@ > * @generated > * @ordered > */ >- protected Integer integerSymbol = INTEGER_SYMBOL_EDEFAULT; >+ protected Number integerSymbol = INTEGER_SYMBOL_EDEFAULT; > > /** > * The default value of the '{@link #isUnlimited() <em>Unlimited</em>}' attribute. >@@ -107,20 +107,22 @@ > > /** > * <!-- begin-user-doc --> >+ * @since 3.0 > * <!-- end-user-doc --> > * @generated > */ >- public Integer getIntegerSymbol() { >+ public Number getIntegerSymbol() { > return integerSymbol; > } > > /** > * <!-- begin-user-doc --> >+ * @since 3.0 > * <!-- end-user-doc --> > * @generated > */ >- public void setIntegerSymbol(Integer newIntegerSymbol) { >- Integer oldIntegerSymbol = integerSymbol; >+ public void setIntegerSymbol(Number newIntegerSymbol) { >+ Number oldIntegerSymbol = integerSymbol; > integerSymbol = newIntegerSymbol; > if (eNotificationRequired()) > eNotify(new ENotificationImpl(this, Notification.SET, >@@ -134,7 +136,7 @@ > * @generated NOT > */ > public boolean isUnlimited() { >- return getIntegerSymbol() == UNLIMITED; >+ return getIntegerSymbol().intValue() == UNLIMITED; > } > > /** >@@ -173,7 +175,7 @@ > public void eSet(int featureID, Object newValue) { > switch (featureID) { > case EcorePackage.UNLIMITED_NATURAL_LITERAL_EXP__INTEGER_SYMBOL : >- setIntegerSymbol((Integer) newValue); >+ setIntegerSymbol((Number) newValue); > return; > } > super.eSet(featureID, newValue); >Index: src/org/eclipse/ocl/ecore/validation/AnyTypeValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/AnyTypeValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/AnyTypeValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/AnyTypeValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.AnyType}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface AnyTypeValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/AssociationClassCallExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/AssociationClassCallExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/AssociationClassCallExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/AssociationClassCallExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.AssociationClassCallExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface AssociationClassCallExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/BagTypeValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/BagTypeValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/BagTypeValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/BagTypeValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.BagType}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface BagTypeValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/BooleanLiteralExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/BooleanLiteralExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/BooleanLiteralExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/BooleanLiteralExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.BooleanLiteralExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface BooleanLiteralExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/CallExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/CallExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/CallExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/CallExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.CallExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface CallExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/CallOperationActionValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/CallOperationActionValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/CallOperationActionValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/CallOperationActionValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,32 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+import org.eclipse.emf.ecore.EOperation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.CallOperationAction}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface CallOperationActionValidator { >+ >+ boolean validate(); >+ >+ boolean validateOperation(EOperation value); >+} >Index: src/org/eclipse/ocl/ecore/validation/CollectionItemValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/CollectionItemValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/CollectionItemValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/CollectionItemValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.CollectionItem}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface CollectionItemValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/CollectionLiteralExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/CollectionLiteralExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/CollectionLiteralExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/CollectionLiteralExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.CollectionLiteralExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface CollectionLiteralExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/CollectionLiteralPartValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/CollectionLiteralPartValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/CollectionLiteralPartValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/CollectionLiteralPartValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.CollectionLiteralPart}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface CollectionLiteralPartValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/CollectionRangeValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/CollectionRangeValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/CollectionRangeValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/CollectionRangeValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.CollectionRange}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface CollectionRangeValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/CollectionTypeValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/CollectionTypeValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/CollectionTypeValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/CollectionTypeValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.CollectionType}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface CollectionTypeValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/ConstraintValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/ConstraintValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/ConstraintValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/ConstraintValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,42 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+import org.eclipse.emf.common.util.EList; >+ >+import org.eclipse.emf.ecore.EClassifier; >+import org.eclipse.emf.ecore.ENamedElement; >+import org.eclipse.emf.ecore.EParameter; >+ >+import org.eclipse.ocl.utilities.ExpressionInOCL; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.Constraint}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface ConstraintValidator { >+ >+ boolean validate(); >+ >+ boolean validateSpecification(ExpressionInOCL<EClassifier, EParameter> value); >+ >+ boolean validateConstrainedElements(EList<ENamedElement> value); >+ >+ boolean validateStereotype(String value); >+} >Index: src/org/eclipse/ocl/ecore/validation/ElementTypeValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/ElementTypeValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/ElementTypeValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/ElementTypeValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.ElementType}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface ElementTypeValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/EnumLiteralExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/EnumLiteralExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/EnumLiteralExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/EnumLiteralExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.EnumLiteralExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface EnumLiteralExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/ExpressionInOCLValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/ExpressionInOCLValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/ExpressionInOCLValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/ExpressionInOCLValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.ExpressionInOCL}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface ExpressionInOCLValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/FeatureCallExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/FeatureCallExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/FeatureCallExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/FeatureCallExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.FeatureCallExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface FeatureCallExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/IfExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/IfExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/IfExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/IfExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.IfExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface IfExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/IntegerLiteralExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/IntegerLiteralExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/IntegerLiteralExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/IntegerLiteralExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.IntegerLiteralExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface IntegerLiteralExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/InvalidLiteralExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/InvalidLiteralExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/InvalidLiteralExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/InvalidLiteralExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.InvalidLiteralExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface InvalidLiteralExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/InvalidTypeValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/InvalidTypeValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/InvalidTypeValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/InvalidTypeValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.InvalidType}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface InvalidTypeValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/IterateExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/IterateExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/IterateExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/IterateExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.IterateExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface IterateExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/IteratorExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/IteratorExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/IteratorExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/IteratorExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.IteratorExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface IteratorExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/LetExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/LetExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/LetExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/LetExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.LetExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface LetExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/LiteralExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/LiteralExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/LiteralExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/LiteralExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.LiteralExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface LiteralExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/LoopExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/LoopExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/LoopExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/LoopExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.LoopExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface LoopExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/MessageExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/MessageExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/MessageExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/MessageExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.MessageExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface MessageExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/MessageTypeValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/MessageTypeValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/MessageTypeValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/MessageTypeValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.MessageType}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface MessageTypeValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/NavigationCallExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/NavigationCallExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/NavigationCallExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/NavigationCallExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.NavigationCallExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface NavigationCallExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/NullLiteralExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/NullLiteralExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/NullLiteralExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/NullLiteralExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.NullLiteralExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface NullLiteralExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/NumericLiteralExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/NumericLiteralExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/NumericLiteralExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/NumericLiteralExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.NumericLiteralExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface NumericLiteralExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/OCLExpressionValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/OCLExpressionValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/OCLExpressionValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/OCLExpressionValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.OCLExpression}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface OCLExpressionValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/OperationCallExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/OperationCallExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/OperationCallExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/OperationCallExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.OperationCallExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface OperationCallExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/OrderedSetTypeValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/OrderedSetTypeValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/OrderedSetTypeValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/OrderedSetTypeValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.OrderedSetType}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface OrderedSetTypeValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/PrimitiveLiteralExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/PrimitiveLiteralExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/PrimitiveLiteralExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/PrimitiveLiteralExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.PrimitiveLiteralExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface PrimitiveLiteralExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/PrimitiveTypeValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/PrimitiveTypeValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/PrimitiveTypeValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/PrimitiveTypeValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.PrimitiveType}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface PrimitiveTypeValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/PropertyCallExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/PropertyCallExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/PropertyCallExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/PropertyCallExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.PropertyCallExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface PropertyCallExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/RealLiteralExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/RealLiteralExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/RealLiteralExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/RealLiteralExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.RealLiteralExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface RealLiteralExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/SendSignalActionValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/SendSignalActionValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/SendSignalActionValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/SendSignalActionValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,32 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+import org.eclipse.emf.ecore.EClass; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.SendSignalAction}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface SendSignalActionValidator { >+ >+ boolean validate(); >+ >+ boolean validateSignal(EClass value); >+} >Index: src/org/eclipse/ocl/ecore/validation/SequenceTypeValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/SequenceTypeValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/SequenceTypeValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/SequenceTypeValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.SequenceType}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface SequenceTypeValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/SetTypeValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/SetTypeValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/SetTypeValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/SetTypeValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.SetType}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface SetTypeValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/StateExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/StateExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/StateExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/StateExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.StateExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface StateExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/StringLiteralExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/StringLiteralExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/StringLiteralExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/StringLiteralExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.StringLiteralExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface StringLiteralExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/TemplateParameterTypeValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/TemplateParameterTypeValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/TemplateParameterTypeValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/TemplateParameterTypeValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.TemplateParameterType}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface TemplateParameterTypeValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/TupleLiteralExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/TupleLiteralExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/TupleLiteralExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/TupleLiteralExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.TupleLiteralExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface TupleLiteralExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/TupleLiteralPartValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/TupleLiteralPartValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/TupleLiteralPartValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/TupleLiteralPartValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.TupleLiteralPart}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface TupleLiteralPartValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/TupleTypeValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/TupleTypeValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/TupleTypeValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/TupleTypeValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.TupleType}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface TupleTypeValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/TypeExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/TypeExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/TypeExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/TypeExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.TypeExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface TypeExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/TypeTypeValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/TypeTypeValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/TypeTypeValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/TypeTypeValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.TypeType}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface TypeTypeValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/UnlimitedNaturalLiteralExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/UnlimitedNaturalLiteralExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/UnlimitedNaturalLiteralExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/UnlimitedNaturalLiteralExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.UnlimitedNaturalLiteralExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface UnlimitedNaturalLiteralExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/UnspecifiedValueExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/UnspecifiedValueExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/UnspecifiedValueExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/UnspecifiedValueExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.UnspecifiedValueExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface UnspecifiedValueExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/VariableExpValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/VariableExpValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/VariableExpValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/VariableExpValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.VariableExp}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface VariableExpValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/VariableValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/VariableValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/VariableValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/VariableValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.Variable}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface VariableValidator { >+ >+ boolean validate(); >+ >+} >Index: src/org/eclipse/ocl/ecore/validation/VoidTypeValidator.java >=================================================================== >RCS file: src/org/eclipse/ocl/ecore/validation/VoidTypeValidator.java >diff -N src/org/eclipse/ocl/ecore/validation/VoidTypeValidator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/ecore/validation/VoidTypeValidator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/** >+ * <copyright> >+ * >+ * Copyright (c) 2009 Eclipse Modeling Project and others. >+ * 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: >+ * IBM - Initial API and implementation >+ * >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ocl.ecore.validation; >+ >+/** >+ * A sample validator interface for {@link org.eclipse.ocl.ecore.VoidType}. >+ * This doesn't really do anything, and it's not a real EMF artifact. >+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. >+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. >+ */ >+public interface VoidTypeValidator { >+ >+ boolean validate(); >+ >+} >#P org.eclipse.ocl.ecore.tests >Index: src/org/eclipse/ocl/ecore/tests/SerializationTest.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/tests/org.eclipse.ocl.ecore.tests/src/org/eclipse/ocl/ecore/tests/SerializationTest.java,v >retrieving revision 1.11 >diff -u -r1.11 SerializationTest.java >--- src/org/eclipse/ocl/ecore/tests/SerializationTest.java 28 Nov 2009 17:47:59 -0000 1.11 >+++ src/org/eclipse/ocl/ecore/tests/SerializationTest.java 12 Jan 2010 19:21:59 -0000 >@@ -20,6 +20,7 @@ > > import java.io.ByteArrayInputStream; > import java.io.ByteArrayOutputStream; >+import java.math.BigInteger; > import java.util.Collections; > import java.util.Iterator; > import java.util.List; >@@ -94,6 +95,38 @@ > } > > /** >+ * Tests the serialization of an expression that uses OCL integer values. >+ */ >+ public void test_integerTypeSerialization() { >+ OCLExpression<EClassifier> expr = parseExpression( >+ EcorePackage.Literals.EPACKAGE, >+ BigInteger.valueOf(Long.MAX_VALUE).add(BigInteger.valueOf(1)) + " > " + Long.MAX_VALUE + " - " + Integer.MAX_VALUE); >+ >+ String toStringForm = expr.toString(); >+ String serialForm = serialize(expr); >+ >+ expr = loadExpression(serialForm); >+ validate(expr); // ensure that it is structurally valid >+ assertEquals(toStringForm, expr.toString()); // should "look" the same >+ } >+ >+ /** >+ * Tests the serialization of an expression that uses OCL real values. >+ */ >+ public void test_realTypeSerialization() { >+ OCLExpression<EClassifier> expr = parseExpression( >+ EcorePackage.Literals.EPACKAGE, >+ "12345678901234567890.123456789e44 > 1.234"); >+ >+ String toStringForm = expr.toString(); >+ String serialForm = serialize(expr); >+ >+ expr = loadExpression(serialForm); >+ validate(expr); // ensure that it is structurally valid >+ assertEquals(toStringForm, expr.toString()); // should "look" the same >+ } >+ >+ /** > * Tests the serialization of an expression that uses collections of > * primitive types. > */ >#P org.eclipse.ocl.uml >Index: src/org/eclipse/ocl/uml/impl/IntegerLiteralExpImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl.uml/src/org/eclipse/ocl/uml/impl/IntegerLiteralExpImpl.java,v >retrieving revision 1.8 >diff -u -r1.8 IntegerLiteralExpImpl.java >--- src/org/eclipse/ocl/uml/impl/IntegerLiteralExpImpl.java 23 Jan 2009 17:16:12 -0000 1.8 >+++ src/org/eclipse/ocl/uml/impl/IntegerLiteralExpImpl.java 12 Jan 2010 19:22:01 -0000 >@@ -55,7 +55,7 @@ > * @generated > * @ordered > */ >- protected static final Integer INTEGER_SYMBOL_EDEFAULT = null; >+ protected static final Number INTEGER_SYMBOL_EDEFAULT = null; > > /** > * The cached value of the '{@link #getIntegerSymbol() <em>Integer Symbol</em>}' attribute. >@@ -65,7 +65,7 @@ > * @generated > * @ordered > */ >- protected Integer integerSymbol = INTEGER_SYMBOL_EDEFAULT; >+ protected Number integerSymbol = INTEGER_SYMBOL_EDEFAULT; > > /** > * <!-- begin-user-doc --> >@@ -88,20 +88,22 @@ > > /** > * <!-- begin-user-doc --> >+ * @since 3.0 > * <!-- end-user-doc --> > * @generated > */ >- public Integer getIntegerSymbol() { >+ public Number getIntegerSymbol() { > return integerSymbol; > } > > /** > * <!-- begin-user-doc --> >+ * @since 3.0 > * <!-- end-user-doc --> > * @generated > */ >- public void setIntegerSymbol(Integer newIntegerSymbol) { >- Integer oldIntegerSymbol = integerSymbol; >+ public void setIntegerSymbol(Number newIntegerSymbol) { >+ Number oldIntegerSymbol = integerSymbol; > integerSymbol = newIntegerSymbol; > if (eNotificationRequired()) > eNotify(new ENotificationImpl(this, Notification.SET, >@@ -143,7 +145,7 @@ > public void eSet(int featureID, Object newValue) { > switch (featureID) { > case UMLPackage.INTEGER_LITERAL_EXP__INTEGER_SYMBOL : >- setIntegerSymbol((Integer) newValue); >+ setIntegerSymbol((Number) newValue); > return; > } > super.eSet(featureID, newValue); >Index: src/org/eclipse/ocl/uml/impl/RealLiteralExpImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl.uml/src/org/eclipse/ocl/uml/impl/RealLiteralExpImpl.java,v >retrieving revision 1.8 >diff -u -r1.8 RealLiteralExpImpl.java >--- src/org/eclipse/ocl/uml/impl/RealLiteralExpImpl.java 23 Jan 2009 17:16:12 -0000 1.8 >+++ src/org/eclipse/ocl/uml/impl/RealLiteralExpImpl.java 12 Jan 2010 19:22:01 -0000 >@@ -55,7 +55,7 @@ > * @generated > * @ordered > */ >- protected static final Double REAL_SYMBOL_EDEFAULT = null; >+ protected static final Number REAL_SYMBOL_EDEFAULT = null; > > /** > * The cached value of the '{@link #getRealSymbol() <em>Real Symbol</em>}' attribute. >@@ -65,7 +65,7 @@ > * @generated > * @ordered > */ >- protected Double realSymbol = REAL_SYMBOL_EDEFAULT; >+ protected Number realSymbol = REAL_SYMBOL_EDEFAULT; > > /** > * <!-- begin-user-doc --> >@@ -88,20 +88,22 @@ > > /** > * <!-- begin-user-doc --> >+ * @since 3.0 > * <!-- end-user-doc --> > * @generated > */ >- public Double getRealSymbol() { >+ public Number getRealSymbol() { > return realSymbol; > } > > /** > * <!-- begin-user-doc --> >+ * @since 3.0 > * <!-- end-user-doc --> > * @generated > */ >- public void setRealSymbol(Double newRealSymbol) { >- Double oldRealSymbol = realSymbol; >+ public void setRealSymbol(Number newRealSymbol) { >+ Number oldRealSymbol = realSymbol; > realSymbol = newRealSymbol; > if (eNotificationRequired()) > eNotify(new ENotificationImpl(this, Notification.SET, >@@ -143,7 +145,7 @@ > public void eSet(int featureID, Object newValue) { > switch (featureID) { > case UMLPackage.REAL_LITERAL_EXP__REAL_SYMBOL : >- setRealSymbol((Double) newValue); >+ setRealSymbol((Number) newValue); > return; > } > super.eSet(featureID, newValue); >Index: src/org/eclipse/ocl/uml/impl/UMLPackageImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl.uml/src/org/eclipse/ocl/uml/impl/UMLPackageImpl.java,v >retrieving revision 1.12 >diff -u -r1.12 UMLPackageImpl.java >--- src/org/eclipse/ocl/uml/impl/UMLPackageImpl.java 6 Dec 2009 18:21:35 -0000 1.12 >+++ src/org/eclipse/ocl/uml/impl/UMLPackageImpl.java 12 Jan 2010 19:22:02 -0000 >@@ -1876,7 +1876,7 @@ > * @generated > */ > protected void createSubsetsAnnotations() { >- String source = "subsets"; //$NON-NLS-1$ >+ String source = "subsets"; //$NON-NLS-1$ > addAnnotation(getAnyType_OwnedOperation(), source, new String[]{}, > new URI[]{URI.createURI(org.eclipse.uml2.uml.UMLPackage.eNS_URI) > .appendFragment("//Classifier/feature") //$NON-NLS-1$ >@@ -1915,7 +1915,7 @@ > * @generated > */ > protected void createExtendedMetaDataAnnotations() { >- String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; //$NON-NLS-1$ >+ String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; //$NON-NLS-1$ > addAnnotation(expressionInOCLEClass, source, new String[]{ > "name", "ExpressionInOcl" //$NON-NLS-1$ //$NON-NLS-2$ > }); >@@ -1931,7 +1931,7 @@ > * @generated > */ > protected void createEcoreAnnotations() { >- String source = "http://www.eclipse.org/emf/2002/Ecore"; //$NON-NLS-1$ >+ String source = "http://www.eclipse.org/emf/2002/Ecore"; //$NON-NLS-1$ > addAnnotation(oclExpressionEClass, source, new String[]{ > "constraints", "has_type" //$NON-NLS-1$ //$NON-NLS-2$ > }); >Index: src/org/eclipse/ocl/uml/impl/UnlimitedNaturalLiteralExpImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl.uml/src/org/eclipse/ocl/uml/impl/UnlimitedNaturalLiteralExpImpl.java,v >retrieving revision 1.8 >diff -u -r1.8 UnlimitedNaturalLiteralExpImpl.java >--- src/org/eclipse/ocl/uml/impl/UnlimitedNaturalLiteralExpImpl.java 23 Jan 2009 17:16:11 -0000 1.8 >+++ src/org/eclipse/ocl/uml/impl/UnlimitedNaturalLiteralExpImpl.java 12 Jan 2010 19:22:02 -0000 >@@ -56,7 +56,7 @@ > * @generated > * @ordered > */ >- protected static final Integer INTEGER_SYMBOL_EDEFAULT = null; >+ protected static final Number INTEGER_SYMBOL_EDEFAULT = null; > > /** > * The cached value of the '{@link #getIntegerSymbol() <em>Integer Symbol</em>}' attribute. >@@ -66,7 +66,7 @@ > * @generated > * @ordered > */ >- protected Integer integerSymbol = INTEGER_SYMBOL_EDEFAULT; >+ protected Number integerSymbol = INTEGER_SYMBOL_EDEFAULT; > > /** > * The default value of the '{@link #isUnlimited() <em>Unlimited</em>}' attribute. >@@ -99,20 +99,22 @@ > > /** > * <!-- begin-user-doc --> >+ * @since 3.0 > * <!-- end-user-doc --> > * @generated > */ >- public Integer getIntegerSymbol() { >+ public Number getIntegerSymbol() { > return integerSymbol; > } > > /** > * <!-- begin-user-doc --> >+ * @since 3.0 > * <!-- end-user-doc --> > * @generated > */ >- public void setIntegerSymbol(Integer newIntegerSymbol) { >- Integer oldIntegerSymbol = integerSymbol; >+ public void setIntegerSymbol(Number newIntegerSymbol) { >+ Number oldIntegerSymbol = integerSymbol; > integerSymbol = newIntegerSymbol; > if (eNotificationRequired()) > eNotify(new ENotificationImpl(this, Notification.SET, >@@ -126,7 +128,7 @@ > * @generated NOT > */ > public boolean isUnlimited() { >- return getIntegerSymbol() == UNLIMITED; >+ return getIntegerSymbol().intValue() == UNLIMITED; > } > > /** >@@ -165,7 +167,7 @@ > public void eSet(int featureID, Object newValue) { > switch (featureID) { > case UMLPackage.UNLIMITED_NATURAL_LITERAL_EXP__INTEGER_SYMBOL : >- setIntegerSymbol((Integer) newValue); >+ setIntegerSymbol((Number) newValue); > return; > } > super.eSet(featureID, newValue); >#P org.eclipse.ocl.uml.tests >Index: src/org/eclipse/ocl/uml/tests/SerializationTest.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/tests/org.eclipse.ocl.uml.tests/src/org/eclipse/ocl/uml/tests/SerializationTest.java,v >retrieving revision 1.11 >diff -u -r1.11 SerializationTest.java >--- src/org/eclipse/ocl/uml/tests/SerializationTest.java 28 Nov 2009 18:10:47 -0000 1.11 >+++ src/org/eclipse/ocl/uml/tests/SerializationTest.java 12 Jan 2010 19:22:03 -0000 >@@ -20,6 +20,7 @@ > > import java.io.ByteArrayInputStream; > import java.io.ByteArrayOutputStream; >+import java.math.BigInteger; > import java.util.Collections; > import java.util.Iterator; > import java.util.List; >@@ -92,6 +93,38 @@ > } > > /** >+ * Tests the serialization of an expression that uses OCL integer values. >+ */ >+ public void test_integerTypeSerialization() { >+ OCLExpression<Classifier> expr = parseExpression( >+ getMetaclass("Package"), >+ BigInteger.valueOf(Long.MAX_VALUE).add(BigInteger.valueOf(1)) + " > " + Long.MAX_VALUE + " - " + Integer.MAX_VALUE); >+ >+ String toStringForm = expr.toString(); >+ String serialForm = serialize(expr); >+ >+ expr = loadExpression(serialForm); >+ validate(expr); // ensure that it is structurally valid >+ assertEquals(toStringForm, expr.toString()); // should "look" the same >+ } >+ >+ /** >+ * Tests the serialization of an expression that uses OCL real values. >+ */ >+ public void test_realTypeSerialization() { >+ OCLExpression<Classifier> expr = parseExpression( >+ getMetaclass("Package"), >+ "12345678901234567890.123456789e44 > 1.234"); >+ >+ String toStringForm = expr.toString(); >+ String serialForm = serialize(expr); >+ >+ expr = loadExpression(serialForm); >+ validate(expr); // ensure that it is structurally valid >+ assertEquals(toStringForm, expr.toString()); // should "look" the same >+ } >+ >+ /** > * Tests the serialization of an expression that uses collections of > * primitive types. > */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 290605
:
155901
|
156100